Topic awaiting preservation: Javascript and Firefox |
|
---|---|
Author | Thread |
Bipolar (III) Inmate From: Phoenix |
posted 06-06-2005 05:19
The following page has Javascript and uses the xmlhttp request object to perform a client-side roundrtrip to the server to fetch additional information for a club within a state, and the club information. It does not work at all in Firefox. Any clues why not? |
Paranoid (IV) Inmate From: Florida |
posted 06-06-2005 06:29
Just a guess (I don't know a lot about JavaScript ), but I'm seeing 'browser sniffing', which imo should be avoided, 'nn4', which should also be avoided, but more importantly I doubt is equivalent to any modern Netscape or Mozilla (Firefox), and ActiveX...let's not get started on that. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 06-06-2005 17:49
For XMPHTTPRequest it's not an instant thing (ergo the asynchrounous). code: if (window.XMLHttpRequest) { req = new XMLHttpRequest(); req.open("GET", url, false); req.send(null); // branch for IE/Windows ActiveX version } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.open("GET", url, false); req.send(); } }
code: if (window.XMLHttpRequest) { req = new XMLHttpRequest(); // branch for IE/Windows ActiveX version } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } if (req) { req.open("GET", url, false); req.onreadystatechage = doSomething; // This is the key line req.send(); }
|