I'm using WAMP in my dev enviornment and everything is fine. When I upload to production server (hosted on Mediatemple.net) my app doesn't work.
The part that doesn't work is the AJAX. I use AJAX to break up a 100+ question application into 8 sections. Basically the user loads the main page, and I rotate each section into a DIV. They fill out the form fields and clicks "Next".
Each time they click Next, they are calling an AJAX function that sends the form data to a PHP page to be validated and inserted, then load the next step of the application into the div
In developement this works fine and all 8 sections load one after another until complete. When I upload to the production server (LAMP) the AJAX gets an error when called on step two.
I included the ajax code for step two.
Any help would be greatly appreciated.
function stepTwo(str)
{
if (str=="")
{
document.form1.case_no.value = "";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById('stepDiv').innerHTML = xmlhttp.responseText;
}
}
var ccfn = document.getElementById('cc_fname').value;
var ccln = document.getElementById('cc_lname').value;
var ccrc = document.getElementById('cc_relation_claimant').value;
var ccn1 = document.getElementById('cc_num1').value + document.getElementById('cc_num1a').value;
var ccn2 = document.getElementById('cc_num2').value + document.getElementById('cc_num2a').value;
var ccn3 = document.getElementById('cc_num3').value + document.getElementById('cc_num3a').value;
var cce = document.getElementById('cc_email').value;
var ccma = document.getElementById('cc_mail_address').value;
var ccc = document.getElementById('cc_city').value;
var ccs = document.getElementById('cc_state').value;
var ccz = document.getElementById('cc_zip').value;
var pq_id = document.getElementById('pq_id').value;
xmlhttp.open("GET","ajax/stepTwo.php?ccfn="+ccfn+"&ccln="+ccln+"&ccrc="+ccrc+"&ccn1="+ccn1+"&ccn2="+ccn2+"&ccn3="+ccn3+"&cce="+cce+"&ccma="+ccma+"&ccc="+ccc+"&ccs="+ccs+"&ccz="+ccz+"&pq_id="+pq_id,true);
xmlhttp.send();
}
The part that doesn't work is the AJAX. I use AJAX to break up a 100+ question application into 8 sections. Basically the user loads the main page, and I rotate each section into a DIV. They fill out the form fields and clicks "Next".
Each time they click Next, they are calling an AJAX function that sends the form data to a PHP page to be validated and inserted, then load the next step of the application into the div
In developement this works fine and all 8 sections load one after another until complete. When I upload to the production server (LAMP) the AJAX gets an error when called on step two.
I included the ajax code for step two.
Any help would be greatly appreciated.
function stepTwo(str)
{
if (str=="")
{
document.form1.case_no.value = "";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById('stepDiv').innerHTML = xmlhttp.responseText;
}
}
var ccfn = document.getElementById('cc_fname').value;
var ccln = document.getElementById('cc_lname').value;
var ccrc = document.getElementById('cc_relation_claimant').value;
var ccn1 = document.getElementById('cc_num1').value + document.getElementById('cc_num1a').value;
var ccn2 = document.getElementById('cc_num2').value + document.getElementById('cc_num2a').value;
var ccn3 = document.getElementById('cc_num3').value + document.getElementById('cc_num3a').value;
var cce = document.getElementById('cc_email').value;
var ccma = document.getElementById('cc_mail_address').value;
var ccc = document.getElementById('cc_city').value;
var ccs = document.getElementById('cc_state').value;
var ccz = document.getElementById('cc_zip').value;
var pq_id = document.getElementById('pq_id').value;
xmlhttp.open("GET","ajax/stepTwo.php?ccfn="+ccfn+"&ccln="+ccln+"&ccrc="+ccrc+"&ccn1="+ccn1+"&ccn2="+ccn2+"&ccn3="+ccn3+"&cce="+cce+"&ccma="+ccma+"&ccc="+ccc+"&ccs="+ccs+"&ccz="+ccz+"&pq_id="+pq_id,true);
xmlhttp.send();
}