Home / Programming / Javascript / IE 7 gives me an "Unknown runtime error" when using ajax - how can I fix this?
IE 7 gives me an "Unknown runtime error" when using ajax - how can I fix this?
Last updated: 02/07/2012
There are several reasons this might happen, but I had this issue with a Sunshop shopping cart contact us form. When submitting the form, IE 7 would actually handle the submission, but give an "Unknown runtime error" and not update the browser screen. So the user did not know the form had submitted.
In this case, the area being updated was a span, like this:
<span id="message"></span>
I simply changed it to:
<div id="message"></div>
Yes, changing the "span" to a "div" fixed the problem. I don't know exactly why, but at that point, I didn't care. The form started working perfectly!