I’m really not sure what could be simpler. On click, IE refuses to load a page using the jQuery load() function. It just gives me an ‘E.location.protocol’ is null or not an object error within the jQuery code itself (1.4.4). Works in every other browser, of course.
I simplified the add_image.php to be a very simple, static page, which I checks as valid at http://validator.w3.org.
I have many of the other posts here about IE load problems, but it isn’t a caching problem, or a validation problem.
So, I can’t figure what I’m doing wrong here. Other than simply trying to code something simple for the world’s most used browser without expecting it to not be a horrible, excruciating, frustrating experience.
$("#add-image-button").click(function(){
$("#dialog").load('/admin_and_tools/forms/add_image.php?time=<?=time()?>');
});
And ideas are greatly appreciated. I’m honestly not sure how to proceed if I can’t count on something so simple as an ajax page load to happen in IE.
Thank you everyone for all your help.
As it turns out, I was making an very basic error (surprise, surprise), and have been trying to work around it for months without suspecting the real cause.
In one of my scripts, I had been redeclaring var location as a global, destroying the original. This only bothered IE for whatever reason, but it indeed was getting rid of this important variable.
Anyway, thanks to JSLint for helping me finally discover this, and thanks everyone for your help.
Please stop reading here to avoid listening to one more anti-microsoft rant:
I would like to add that every attempt at using any sort of debugger in Microsoft, either the built in one in IE, the downloadable Script Debugger, or even FirebugLite intended to help with debugging javascript on IE was useless – either giving false line numbers, not being able to find the source or not throwing any error at all. Not to mention the clunky UI of the I debugger, the graphical screw ups, the incessant redirects in Microsofts own website – everything I have tried was painful. Really, if I turned out a product like they do – god help me I’d starve to death.