<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <blockquote cite="mid:1329737439879-4487467.post@n6.nabble.com"
      type="cite">
      <pre wrap="">
Thank you I got that.
but now I'm confused, when will this func be called ?

// called when features are fetched
function loadFeatures(data) {
    var features = new OpenLayers.Format.GeoJSON().read(data);
    states.addFeatures(features);</pre>
    </blockquote>
    This refers to the CQL_Filter example. If you look at the html, you
    will see that it loads the wfs via jsonp with this script insertion:<br>
    <pre id="line50">  &lt;<span class="start-tag">script</span><span class="attribute-name"> src</span><span>="</span><a href="view-source:http://demo.opengeo.org/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typename=topp:states&amp;outputFormat=json&amp;format_options=callback:loadFeatures">http://demo.opengeo.org/geoserver/wfs?service=WFS&amp;amp;version=1.0.0&amp;amp;request=GetFeature&amp;amp;typename=topp:states&amp;amp;outputFormat=json&amp;amp;format_options=callback:loadFeatures</a><span>" </span><span class="attribute-name">type</span>=<span class="attribute-value">"text/javascript"</span>&gt;&lt;/<span class="end-tag">script</span>&gt;
after the cql-format.js script.

If you are loading your data via geojson, you need this kind of mechanism to beat cross-domain ajax
prohibitions in browsers. However, depends on how and where you get the vector data. See other vector demos for alternatives.

</pre>
    <br>
  
<p><span style="font-family:'Arial';font-size:8pt; color:#000000;">Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.</span></p>
<p><span style="font-family:'Arial';font-size:8pt; color:#000000;">&nbsp;</span></p></body>
</html>