<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=830351813-08102008>hrm, all I can think of is maybe callback is
required...</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=830351813-08102008>add</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=830351813-08102008>callback: function(){alert('Maybe Im
required')},</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=830351813-08102008>somewhere in there</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=830351813-08102008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=830351813-08102008>did <FONT face="Times New Roman"
size=3>"getStringItem1" and "item2" make it inside the $_GET
array?</FONT></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT><SPAN class=830351813-08102008>In firebug, when
you look at the response you are getting back is it completely
empty?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT><SPAN class=830351813-08102008>If so, try putting
an echo an the beginning of your php file to see if it is even getting
there.</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <B>On Behalf Of </B>Ian<BR><B>Sent:</B>
Tuesday, October 07, 2008 8:13 PM<BR><B>To:</B>
users@openlayers.org<BR><B>Subject:</B> Re: [OpenLayers-Users]
OpenLayers.Request.POST/GET errors<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr><BR>
<DIV class=gmail_quote>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><SPAN>have you tried:</SPAN></DIV>
<DIV dir=ltr align=left><SPAN>new OpenLayers.Request.issue({</SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial size=2>
method: 'POST',</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial size=2>
<A>url:<FONT face="Times New Roman" size=3>'</FONT></A><A
href="http://www.host.com/lib/printMap.php" target=_blank><FONT
face="Times New Roman" color=#000000
size=3>http://www.host.com/lib/printMap.php</FONT></A><FONT
face="Times New Roman" size=3><FONT color=#000000>'</FONT></FONT><FONT
face=Arial size=2>,</FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN> <FONT face=Arial
size=2>params: {</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial
size=2>
getStringItem1:'cheesburger',</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial
size=2>
item2:'wambat'</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial size=2>
},</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN> <FONT face=Arial
size=2>data:{</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial
size=2> postedUsername:
'myUsername',</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN> <FONT
face=Arial size=2>postedPassword: 'myPassword'</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial size=2>
},</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN> <FONT face=Arial
size=2>success: function(request){</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial
size=2>
alert(request.responseText);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN></SPAN><SPAN><FONT face=Arial
size=2> },</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN> <FONT face=Arial
size=2>failure:function(request){
<DIV dir=ltr align=left><SPAN><FONT face=Arial
size=2>
alert('BOOOOOO!');</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN></SPAN><SPAN><FONT face=Arial
size=2> }</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN>});</SPAN></DIV>
<DIV dir=ltr align=left><SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial size=2>and have you checked the
$_GET and $_POST arrays in PHP? the request array is usually frowned
upon.</FONT></SPAN></DIV></DIV></BLOCKQUOTE></DIV><BR><BR>Thank you for the
reply Chris. I tried your example and I get the javascript error "complete is
not a function" at line 332:<BR><BR><PRE id=line1>request.onreadystatechange=function(){if(request.readyState==OpenLayers.Request.XMLHttpRequest.DONE){complete(request);if(success&&(!request.status||(request.status>=200&&request.status<300))){success(request);}</PRE><BR>The
parameters "getStringItem1" and "item2" are posted according to Firebug. The
$_POST array is empty, likely due to the error.<BR></DIV></BODY></HTML>