[mapserver-users] RE: [Geomoose-developers] aJAX
Jay Kapalczynski
jkapalczynski at ci.maple-grove.mn.us
Mon Dec 7 12:31:27 PST 2009
One last syntax question....
When I call the ajax page to send the values to:
getRunquery('parcellinktest.php','1211922220012','S')
Whats the syntax to replace the '1211922220012' with a variable?
I tried this:
getRunquery('parcellinktest.php', .'varaible'. ,'S')
thanks again
-----Original Message-----
From: Brent Fraser [mailto:bfraser at geoanalytic.com]
Sent: Monday, December 07, 2009 12:54 PM
To: Jay Kapalczynski
Cc: 'geomoose-developers at lists.sourceforge.net'; 'mapserver-users at lists.osgeo.org'
Subject: Re: [Geomoose-developers] aJAX
Actually they are not identical (there's an extra ")" in getRunquery. And there
could be other syntax problems...
Jay Kapalczynski wrote:
> I am trying to write some ajax here to run a query. I simplified this
> down so that no query is happening, rather just getting all the pages to
> work together and return some text.
>
> I don't know whats going on here
>
>
>
> 1. I created a button that calls a javascript function
>
>
>
> <input type="button" value="Send to Ajax and Tab"
> onClick="ReturnQueryResults();">
>
>
>
>
>
> 2. This function is calling and passing an ajax page some info.
>
>
>
> function ReturnQueryResults() {
>
>
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
> /*
> getResulthype('parcellinktest.php','1211922220012','S') */
>
> }
>
>
>
> 3. Once there it (depending on what is commented out in the ajax
> page) it runs one of two functions (both of which are IDENTICAL)
>
> But for some reason when I run the getRunquery I get errors....but when I
> run the getResulthype it works.
>
> I am passing the same values to the same php page.
>
> I just added the getRunquery to the ajax page.
>
>
>
>
>
> *function getResulthype(page,id,type){*
>
>
>
> var _target = 'content_details_form';
>
>
>
> if (id.length == 0) {
>
> document.getElementById(_target).innerHTML="<b>No Information
> Available</b>";
>
> return;
>
> }
>
> xmlHttp = GetAJAXObject();
>
> if (xmlHttp==null) {
>
> alert ("Unable to process your request, your browser does not
> support AJAX!");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
> *function getRunquery(page,id,type){*
>
> var _target = 'content_details_form';
>
>
>
> if (url.length == )) {
>
> document.getElementById(_target_.innerHTML="<b>No Information
> Available</b>";
>
> return;
>
> }
>
> xmlhttp = GetAJAXObject();
>
> if {xmlHttp==null) {
>
> alert ("Unable to process you request, your browser does
> not support AJAX");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
>
>
>
>
>
>
> I thought something might be hanging so I cleared all temp files, shut
> down, restarted Apache.
>
>
>
> If the values are the same, and they are being sent to the same page how
> can I be getting errors....
>
>
>
> Error:
>
> getRunquery is not defined
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geomoose-developers mailing list
> Geomoose-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geomoose-developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091207/853af0a0/attachment.htm>
More information about the MapServer-users
mailing list