<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font style="font-size:10pt;" color="#366092" face="Arial" size="2">H<font style="font-size: 10pt;" size="2">i all,<br><br><font style="font-size: 10pt;" size="2">I'm using OL 2.11 <font style="font-size: 10pt;" size="2">with GeoExt 1.<font style="font-size: 10pt;" size="2">1<font style="font-size: 10pt;" size="2">. After testing and mod<font style="font-size: 10pt;" size="2">ifying </font>this GeoExt example: <a href="http://geoext.org/lib/GeoExt/widgets/form/FormPanel.html" target="_blank">http://geoext.org/lib/GeoExt/widgets/form/FormPanel.html</a>, I</font></font></font></font> had proble<font style="font-size: 10pt;" size="2">ms with destroyin<font style="font-size: 10pt;" size="2">g<font style="font-size: 10pt;" size="2"> and reading</font></font></font> the new protocol<font style="font-size: 10pt;" size="2">, I'm getting </font></font></font><font style="font-size:10pt;" color="#366092" face="Arial" size="2"><font style="font-size: 10pt;" size="2"><font style="font-size: 10pt;" size="2"><span class="errorMessage">"TypeError: this.options is <font style="font-size: 10pt;" size="2">null</font></span></font></font></font><font style="font-size: 10pt;" color="#366092" size="2"><font style="" face="Arial"> </font></font><font style="font-size: 10pt;" size="2">HTTP.js (line 180</font><font style="font-size:10pt;" color="#366092" face="Arial" size="2"><font style="font-size: 10pt;" size="2"><font style="font-size: 10pt;" size="2">)"</font> in firebug.<font style="font-size: 10pt;" size="2"> <font style="font-size: 10pt;" size="2">What <font style="font-size: 10pt;" size="2">I<font style="font-size: 10pt;" size="2"> understand from this line 18<font style="font-size: 10pt;" size="2">0 is that the new options (in the new protocol) are not there, not sure if this is <font style="font-size: 10pt;" size="2">the problem and</font> <font style="font-size: 10pt;" size="2">how to solve it<font style="font-size: 10pt;" size="2">. This is the <font style="font-size: 10pt;" size="2">original protocol (created outsi<font style="font-size: 10pt;" size="2">de the <font style="font-size: 10pt;" size="2">FormPanel<font style="font-size: 10pt;" size="2">):<br><br><font style="font-size: 10pt;" size="2">protocol = new OpenLayers.Protocol.HTTP({<br> url: '/fs/',<br> format: new OpenLayers.Format.GeoJSON({<br> ignoreExtraDims: true,<br> 'internalProjection': new OpenLayers.Projection('EPSG:900913'),<br> 'externalProjection': new OpenLayers.Projection('EPSG:4326')<br> })<br> });</font><br><br></font></font></font></font>This is the code at the end of the FormPanel where <font style="font-size: 10pt;" size="2">the new protocol is c<font style="font-size: 10pt;" size="2">r<font style="font-size: 10pt;" size="2">eated:</font></font></font></font></font></font></font></font></font></font><br></font><br> buttons: [{<br> text: 'Search',<br> handler: function() {<br><br> comboLayer = Ext.getCmp('idcombo').getValue();<br> keyword = Ext.getCmp('idtextfield').getRawValue();<br><br> protocol.destroy();<br><br> protocol = new OpenLayers.Protocol.HTTP({<br> url: '/fs/' + comboLayer + '?format=GeoJSON&comments__ilike=' + keyword + '&queryable=comments',<br> format: new OpenLayers.Format.GeoJSON({<br> ignoreExtraDims: true,<br> 'internalProjection': new OpenLayers.Projection('EPSG:900913'),<br> 'externalProjection': new OpenLayers.Projection('EPSG:4326')<br> })<br> });<br><br> protocol.read();<br><br> formPanel.search();<br> }<br> }]<br><br><font style="font-size: 10pt;" size="2">In the<font style="font-size: 10pt;" size="2"> case I r<font style="font-size: 10pt;" size="2">emove</font><font style="font-size: 10pt;" size="2"><font style="font-size: 10pt;" size="2"><font style="font-size: 10pt;" size="2"> "pr<font style="font-size: 10pt;" size="2">otocol<font style="font-size: 10pt;" size="2">.<font style="font-size: 10pt;" size="2">destroy();", both the original and the<font style="font-size: 10pt;" size="2"> new protocols are sent, but alwa<font style="font-size: 10pt;" size="2">ys the original is sent after the new one, <font style="font-size: 10pt;" size="2">this happens <font style="font-size: 10pt;" size="2">beca<font style="font-size: 10pt;" size="2">u<font style="font-size: 10pt;" size="2">se the request is <font style="font-size: 10pt;" size="2">AJAX? is it possible to send the new after the original?<br><br><font style="font-size: 10pt;" size="2">I'd appreciate <font style="font-size: 10pt;" size="2">some support on this, thanks in advance,</font></font><br></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font><br> </div></body>
</html>