since i not-so-recently have been working on web pages/UIs that are only used within the company, i almost always don’t care whether it works for IE or not. it’s bad practice, yes. but then i could just tell the marketing guys to “use damned Firefox for heaven’s sake!”
then again you can’t tell the whole world to use Firefox. actually you could but what about that IE 7 and its tabs? or what’s Firefox? i’ll bet grandma will ask you that.. .
well here’s a useful javascript function that you might want to use in AJAX. it will return the necessary object needed for it to work on major browsers such as Firefox and IE. it should work with Safari too. i haven’t tried it out with Opera.
function getXMLHttpRequestObject()
{
if (window.XMLHttpRequest){
return new XMLHttpRequest();
}
else if (window.ActiveXObject){
return new ActiveXObject("Microsoft.XMLHTTP");
}
return null;
}
Similar Posts:
- > Error: uncaught exception: Permission denied to call method XMLHttpRequest.open February 7, 2007
- > Removing Null Values In A List Using Java 8 Stream October 22, 2020
- > Rewriting Nested If/Else September 7, 2022
- > Odd Firefox 4 Restore Previous Session Behavior March 15, 2011
- > FireCrash or FailFox? you choose. April 21, 2009
Notice: This article was published on April 12, 2007 and the content above may be out of date.