Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xmlHttp works on dev server, but not the qa any ideas why?

Status
Not open for further replies.

wrighterb

Programmer
Feb 20, 2007
80
US
I have this on Mouse down, I put in an alert to check the url and all is good. I have this program running on another server and it works great. I put this program on the qa server and doesn't run the url. Any Ideas why it would work on one server not another

AutoComplete.prototype.onDivMouseDown = function()
{
if (typeof(this.innerHTML) == 'undefined') {
<!---alert("this.innerHTML "+this.innerHTML);--->
this.innerHTML = document.GoForm.theText.value;
<!---alert("this.innerHTML after setting the... "+this.innerHTML);--->
AutoComplete.oText = document.GoForm.theText.value;
<!---alert("AutoComplete.oText ="+AutoComplete.oText);--->
AutoComplete.oText = this;
}
else { this.AutoComplete.oText.value = this.innerHTML; }
var url="MWQuickOrderForm.jsp?theText=" + document.GoForm.theText.value;
<!---alert(url);--->
xmlHttp.open('get', url, true);
xmlHttp.onreadystatechange = myResponseMethod;
xmlHttp.send('null');
 
It might your use of <!--- throughout your javascript. This is incorrect use of HTML comments. You should use // to achieve the same effect with javascript (and you can use c-style comments /* */ to comment multiple lines in javascript.

Use firefox. Use firebug extension. Let us know any errors you get (once you have fixed the comments problem).

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Does your other server recognize .jsp files?

One other thing, you may want to put an alert on your .responseText in myResponseMethod.

Put the alert above any error checks to see what it returns.


[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top