<div class="gmail_extra">did you find this on your geoserver demo page?</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">
<span class="webkit-javascript-ident" style>map</span>.<span class="webkit-javascript-ident" style>events</span>.<span class="webkit-javascript-ident" style>register</span>(<span class="webkit-javascript-string" style="color:rgb(196,26,22)">&#39;click&#39;</span>, <span class="webkit-javascript-ident" style>map</span>, <span class="webkit-javascript-keyword" style="color:rgb(170,13,145)">function</span> (<span class="webkit-javascript-ident" style>e</span>) {</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                    <span class="webkit-javascript-ident" style>document</span>.<span class="webkit-javascript-ident" style>getElementById</span>(<span class="webkit-javascript-string" style="color:rgb(196,26,22)">&#39;nodelist&#39;</span>).<span class="webkit-javascript-ident" style>innerHTML</span> = <span class="webkit-javascript-string" style="color:rgb(196,26,22)">&quot;Loading... please wait...&quot;</span>;</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                    <span class="webkit-javascript-keyword" style="color:rgb(170,13,145)">var</span> <span class="webkit-javascript-ident" style>params</span> = {</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>REQUEST</span>: <span class="webkit-javascript-string" style="color:rgb(196,26,22)">&quot;GetFeatureInfo&quot;</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>EXCEPTIONS</span>: <span class="webkit-javascript-string" style="color:rgb(196,26,22)">&quot;application/vnd.ogc.se_xml&quot;</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>BBOX</span>: <span class="webkit-javascript-ident" style>map</span>.<span class="webkit-javascript-ident" style>getExtent</span>().<span class="webkit-javascript-ident" style>toBBOX</span>(),</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>X</span>: <span class="webkit-javascript-ident" style>e</span>.<span class="webkit-javascript-ident" style>xy</span>.<span class="webkit-javascript-ident" style>x</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>Y</span>: <span class="webkit-javascript-ident" style>e</span>.<span class="webkit-javascript-ident" style>xy</span>.<span class="webkit-javascript-ident" style>y</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>INFO_FORMAT</span>: <span class="webkit-javascript-string" style="color:rgb(196,26,22)">&#39;text/html&#39;</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>QUERY_LAYERS</span>: <span class="webkit-javascript-ident" style>map</span>.<span class="webkit-javascript-ident" style>layers</span>[<span class="webkit-javascript-number" style="color:rgb(28,0,207)">0</span>].<span class="webkit-javascript-ident" style>params</span>.<span class="webkit-javascript-ident" style>LAYERS</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>FEATURE_COUNT</span>: <span class="webkit-javascript-number" style="color:rgb(28,0,207)">50</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>Styles</span>: <span class="webkit-javascript-string" style="color:rgb(196,26,22)">&#39;&#39;</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>Srs</span>: <span class="webkit-javascript-string" style="color:rgb(196,26,22)">&#39;EPSG:4326&#39;</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>Layers</span>: <span class="webkit-javascript-string" style="color:rgb(196,26,22)">&#39;topp:myLayer&#39;</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>WIDTH</span>: <span class="webkit-javascript-ident" style>map</span>.<span class="webkit-javascript-ident" style>size</span>.<span class="webkit-javascript-ident" style>w</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>HEIGHT</span>: <span class="webkit-javascript-ident" style>map</span>.<span class="webkit-javascript-ident" style>size</span>.<span class="webkit-javascript-ident" style>h</span>,</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                        <span class="webkit-javascript-ident" style>format</span>: <span class="webkit-javascript-ident" style>format</span>};</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                    <span class="webkit-javascript-ident" style>updateFeatureInfoFilters</span>(<span class="webkit-javascript-ident" style>params</span>);</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                    <span class="webkit-javascript-ident" style>OpenLayers</span>.<span class="webkit-javascript-ident" style>loadURL</span>(<span class="webkit-javascript-string" style="color:rgb(196,26,22)">&quot;http://myip:myport/geoserver/wms&quot;</span>, <span class="webkit-javascript-ident" style>params</span>, <span class="webkit-javascript-keyword" style="color:rgb(170,13,145)">this</span>, <span class="webkit-javascript-ident" style>setHTML</span>, <span class="webkit-javascript-ident" style>setHTML</span>);</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                    <span class="webkit-javascript-ident" style>OpenLayers</span>.<span class="webkit-javascript-ident" style>Event</span>.<span class="webkit-javascript-ident" style>stop</span>(<span class="webkit-javascript-ident" style>e</span>);</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">                });</div>
<div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)"><br></div><div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">
<br></div><div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)"><br></div><div class="webkit-line-content" style="padding-left:2px;font-family:Consolas,&#39;Lucida Console&#39;,monospace;font-size:12px;line-height:14px;white-space:pre;background-color:rgb(255,255,255)">

<div class="webkit-line-content" style="padding-left:2px"><span class="webkit-javascript-comment" style="color:rgb(0,116,0)">//callback function</span></div><div class="webkit-line-content" style="padding-left:2px">            <span class="webkit-javascript-keyword" style="color:rgb(170,13,145)">function</span> <span class="webkit-javascript-ident" style>setHTML</span>(<span class="webkit-javascript-ident" style>response</span>){</div>
<div class="webkit-line-content" style="padding-left:2px">                <span class="webkit-javascript-ident" style>document</span>.<span class="webkit-javascript-ident" style>getElementById</span>(<span class="webkit-javascript-string" style="color:rgb(196,26,22)">&#39;nodelist&#39;</span>).<span class="webkit-javascript-ident" style>innerHTML</span> = <span class="webkit-javascript-ident" style>response</span>.<span class="webkit-javascript-ident" style>responseText</span>;</div>
<div class="webkit-line-content" style="padding-left:2px">            };</div><div class="webkit-line-content" style="padding-left:2px"><br></div><div class="webkit-line-content" style="padding-left:2px">regards,</div><div class="webkit-line-content" style="padding-left:2px">
Imran</div>
</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 26, 2012 at 4:39 PM, chamara prasanna <span dir="ltr">&lt;<a href="mailto:sacprasanna@gmail.com" target="_blank">sacprasanna@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think i use wrong word to describe my problme.So i will ask again,Really sorry for mistake</blockquote>
<div><br></div><div> <span>I am new to OpenLayers and I want to add OpenLayers.Control.WMSGetFeatureInfo to get feature</span></div><p>info to website.But i can&#39;t figure out right method.</p><p>I also see the source code of GeoServer OpenLayers page and still I can&#39;t find the syntax of OpenLayers.Control.WMSGetFeatureInfo code?</p>

<p>I use geoserver,apache-tomcat-6.0.35 and open layer 2.10.Should i use proxy to call OpenLayers.Control.WMSGetFeatureInfo?</p><div class="im"><p>This is my GeoServer WMS URL:</p><pre style="margin-top:0px;margin-bottom:10px;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:12px;vertical-align:baseline;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;background-color:rgb(238,238,238);color:rgb(51,51,51);line-height:18px;text-align:left">
<code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;color:rgb(34,34,34)"><a href="http://localhost:8080/geoserver/sac/wms?service=WMS&amp;version=1.1.0&amp;request=GetMap&amp;layers=sac:contour&amp;" target="_blank">http://localhost:8080/geoserver/sac/wms?
service=WMS&amp;
version=1.1.0&amp;
request=GetMap&amp;
layers=sac:contour&amp;</a>
styles=&amp;
bbox=187754.5,204980.703125,192031.40625,210022.890625&amp;
width=434&amp;height=512&amp;s
rs=EPSG:5235&amp;
format=application/openlayers
</code></pre></div><p>Pls give me sample code which calling OpenLayers.Control.WMSGetFeatureInfo? Thank you.</p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><br>


</blockquote></div><br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>I.R<br>
</div>