troubleshooting Question

ASP/Ajax application giving "Length Required" error on IIS6/Firefox

Avatar of kalmen
kalmen asked on
ASPMicrosoft IIS Web ServerAJAX
15 Comments1 Solution1332 ViewsLast Modified:
I had an application written in ASP (VB Script) with Ajax, and it worked on IIS5 with all browsers. Now, after moving to IIS6, it only works on IE, and gives the error on firefox.

Here is the code:


function getresult(str)
{ 
 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
 
var url="result1.asp";
url=url+"?fname="+document.form1.fname.value+"&lname="+ document.form1.lname.value+"&ext="+ document.form1.ext.value;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.send(null);
}
 
function goletter(vs){
var nam = this.lt.value;
window.location.href = "letresult.asp?letv=a&letsort="+nam;
 
}
function godept1(URL_List){
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url1 = document.form1.dept.options[document.form1.dept.selectedIndex].value;
var space = / /;
var fl=url1.length;
for(f=1;f<fl;f++)
	url1=url1.replace(space, "+");   
url = "result1.asp?deptn="+url1;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.send(null);
}
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 15 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros