I now went back and changed the ajax function (getRunquery, getResulthype) to 
"getResulthype" and not this function is getting the error "not defined" but it 
was working 20 seconds ago.

What can be hanging up here?

From: Jay Kapalczynski
Sent: Monday, December 07, 2009 12:38 PM
To: 'geomoose-develop...@lists.sourceforge.net'; 
'mapserver-users@lists.osgeo.org'
Subject: aJAX

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
[cid:image001.png@01CA773B.6EF61FC0]getRunquery('parcellinktest.php','1211922220012','S')



<<inline: image001.png>>

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to