Hi folks.
I know I'm drifting O/T, so if anyone can suggest a better source of Help I'll try elsewhere..........but
Can anyone tell me while the following code doesn't work in IE, but does work Firefox?
document.getElementById("listdiv").innerHTML=xmlHttp.responseText;
The full function is here. The alert does show the HTML is there in both browsers, but it only appears in Firefox.
AjaxRequest("/used_diary_ajax.html?search="+str, function(xmlHttp) { if(xmlHttp.readyState==4) { alert("ajax returned"+xmlHttp.responseText); document.getElementById("listdiv").innerHTML=xmlHttp.responseText; } } );
The HTML of the page has:
<div id="listdiv"></div>
Gary, Perhaps the responseText has quotes in the data or some other chars you need to delimit which throughs off the alert function. FireFox and IE both have very good Web Developer plug-ins now which will assist you in many javascript issues. -eric wood
From: "Gary Stainburn"
Can anyone tell me while the following code doesn't work in IE, but does work Firefox? alert("ajax returned"+xmlHttp.responseText); document.getElementById("listdiv").innerHTML=xmlHttp.responseText;
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Gary Stainburn wrote:
Hi folks.
I know I'm drifting O/T, so if anyone can suggest a better source of Help I'll try elsewhere..........but
Can anyone tell me while the following code doesn't work in IE, but does work Firefox?
Hi Gary,
Try debugging the issue using the Firebug[1] addon for firefox and the Developer[2] extension for IE.
I find using Firebug + WebDeveloper[3] very helpful when dealing with client side code.
HTH, Rogue
[1] https://addons.mozilla.org/en-US/firefox/addon/1843 [2] http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-... [3] https://addons.mozilla.org/en-US/firefox/addon/60
On Thursday 23 August 2007 20:57, Rogue wrote:
Hi Gary,
Try debugging the issue using the Firebug[1] addon for firefox and the Developer[2] extension for IE.
I find using Firebug + WebDeveloper[3] very helpful when dealing with client side code.
HTH, Rogue
Very useful Rogue. I'll look into all 3 links. I've managed fine so far with vanilla firefox cos it just does what it says on the tin.
I.E. is the pain
Cheers
Gary