refiking Posted October 31, 2009 Share Posted October 31, 2009 Ok. So, I have a function that calls a page that worked fine on the first page. However, when I changed the variable names on the next page, I ran into problems. Here's the working function: function GetJobDetails(job_id, ProjectName) { document.getElementById("jobdetails").innerHTML = '<div style="text-align:center;"><b style="font-size:14px; color:#0099FF;">Loading...</b><br /><img src="images/LoadingCircle.gif" /></div>'; xmlHttp=GetXmlHttpObjecthandler(); if (xmlHttp==null) { alert ("Browser does not support HTTP Request"); return; } url = "jobdetails.php?job_id=" + job_id + "&pn=" + ProjectName; url = url + "&sid=" + Math.random(); xmlHttp.onreadystatechange=stateChangedmedia; xmlHttp.open("GET",url,true) ; xmlHttp.send(null); } </script> Here's the non-functioning function: function GetSetDetails(jobid, setid) { document.getElementById("setdetails").innerHTML = '<div style="text-align:center;"><b style="font-size:14px; color:#0099FF;">Loading...</b><br /><img src="images/LoadingCircle.gif" /></div>'; xmlHttp=GetXmlHttpObjecthandler(); if (xmlHttp==null) { alert ("Browser does not support HTTP Request"); return; } url = "filemanager.php?jobid=" + jobid + "&setid=" + setid; url = url + "&sid=" + Math.random(); xmlHttp.onreadystatechange=stateChangedmedia; xmlHttp.open("GET",url,true) ; xmlHttp.send(null); } </script> Quote Link to comment Share on other sites More sharing options...
abazoskib Posted October 31, 2009 Share Posted October 31, 2009 Are you accepting the correct variables? To accept the variables of you rnon functioning function you should be looking for $_GET['setid'] and $_GET['jobid']. Quote Link to comment Share on other sites More sharing options...
refiking Posted October 31, 2009 Author Share Posted October 31, 2009 Yes. They are set. But, honestly, the page only has <? echo "hello"; ?> It just isn't processing it. If you notice, I have a loading icon that appears while it's running the page resquest and that doesn't even happen. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.