[OpenLayers-Users] replacing url in OpenLayers.Protocol.HTTP

Gery . gamejihou at hotmail.com
Thu Jan 10 03:36:07 PST 2013







Hello,

I've been trying to replace correctly an url in OpenLayers.Protocol.HTTP after using a GeoExt.form.FormPanel (ie. combobox and textfield), but seems that the new url is being passed to the url of ExtJS and not to the url of the protocol. I've a live demo for this here: http://jsbin.com/ireqed/2/edit. In the case I choose "Boreholes" in the combobox and enter "cool" in textfield, the new url I want will be: http://www.mop.org/fs/Boreholes?format=GeoJSON&comments__ilike=cool&queryable=comments (please see [1]).

To send this new url to the protocol, I use an autoLoad call in the handler function of the search button, after pressing it the new url is sent but it's not catched by the protocol itself (ie. XMLHttpRequest.js) but for ExtJS. So, the GeoJSON output is displayed in the window of the form panel (please see [2]). Thus, in Firebug two urls (please see [3]) are called, the first one is the new url I want in the url of the protocol, but it goes to ext-base.js, which is the wrong place. The second one, I actually don't know why is sent, goes to XMLHttpRequest.js which is the right place, but it shouldn't be sent.

I tried taking out the protocol from the form panel and put it as variable, but after pressing the button, I receive o.protocol is null in Firebug.

how could I do to replace correctly my new url (ie. 'myurl' in the code)? it seems to me that the new url is replacing an inexistent url which belongs to ExtJS,

I'd appreciate any suggestions about this problem, thanks in advance,

Best regards,

[1]: http://i.stack.imgur.com/7ow1t.png
[2]: http://i.stack.imgur.com/yQTOm.png
[3]: http://i.stack.imgur.com/YsWXc.png


__________________________________________________________________________________________
Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario.
Think green - keep it on the screen. Do NOT print if it is NOT necessary.
Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie NICHT, wenn es NICHT notwendig ist.
 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130110/2ff8e17e/attachment-0001.html>


More information about the Users mailing list