[OpenLayers-Users] OpenLayers.Request.POST/GET errors

Ian iansgis at gmail.com
Wed Oct 8 14:49:19 EDT 2008


>  hrm, all I can think of is maybe callback is required...
> add
> callback: function(){alert('Maybe Im required')},
> somewhere in there
>
> did "getStringItem1" and "item2" make it inside the $_GET array?
> In firebug, when you look at the response you are getting back is it
> completely empty?
> If so, try putting an echo an the beginning of your php file to see if it
> is even getting there.
>


Adding the callback did take care of the javascript error, but Firebug is
still showing an empty POST (though "getStringItem1" and "item2" are in the
Params section). The values do not make it into the $_POST array however
they are in the $_GET array.

I also tried doing a GET a couple of different ways, both with different
results:

new OpenLayers.Request.issue({method:'GET', url:.....});
Nothing happens, the GET never even shows up in Firebug.

new OpenLayers.Request.issue({url:...});
Since GET is the default I tried this method as well and got the javascript
error:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80070057
(NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]"  nsresult: "0x80070057
(NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame ::
http://openlayers.org/api/OpenLayers.js ::
anonymous :: line 511"  data: no]

Hopefully using a POST and accessing the $_GET array will work for my code.
Being a relative newbie to PHP and AJAX, I don't know if this is intended
behavior for OpenLayers.Request but I wanted to document my results. Thank
you for the help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081008/25071668/attachment.html


More information about the Users mailing list