I ran into an interesting [read: really frustrating] IE issue today. If you have a non-block element, e.g. a form, and you try to insert content using innerHTML, e.g.
form.innerHTML += '<input type="hidden" name="a" value="b" />'
You may get an error along the lines of "Unknown runtime error" (hresult: -2146827687). The short answer is that form is a non-block element and you cannot insert a block element inside a non-block element. Interestingly, this has been working for me for for the past two months. I haven't figured out what changed yet to push it over the edge.
So, the fix for me was relatively straight-forward. I already had a div nested inside the form, and so I just grabbed it, prototype-style:
$('left-form').innerHTML += '<input type="hidden" name="a" value="b" />'
form.submit();
And everything was cool again.
Ahhhh, minutiae, how I love thee.
I found the right direction from this forum, so um, mad, um, er, props. Or whatever the cool kids say.
Recent Comments