[OpenLayers-Users] OpenLayers.Request POST and IE 6/7 issues
Ian
iansgis at gmail.com
Wed Oct 29 13:38:50 EDT 2008
> $_REQUEST will contain form-encoded parameters (sent as data in a POST).
>
>
Right, so using your getParameterString example:
OpenLayers.Request.POST({url: printURL, data:
OpenLayers.Util.getParameterString({width:size.w, height:size.h}), callback:
function(request) {alert(request.status);alert(request.responseText);}});
should form encode width and height and it should be in the $_POST array
correct? But it isn't. My PHP script is run, Firebug says
'width=500&height=500' is posted, but $_REQUEST, $_POST, and $_GET are all
empty.
I tested the $_POST array outside of OL with:
<?php
if( $_POST["name"] || $_POST["age"] )
{
echo "Welcome ". $_POST['name']. "<br />";
echo "You are ". $_POST['age']. " years old.";
exit();
}
?>
<html>
<body>
<form action="<?php $_PHP_SELF ?>" method="POST">
Name: <input type="text" name="name" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
</body>
and this worked correctly so my PHP installation is fine. I also tried using
text/plain headers to no avail. OpenLayers.Request.POST data still is not
showing up in PHP's $_REQUEST and $_POST arrays.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081029/31e58bcc/attachment.html
More information about the Users
mailing list