innerHTML and non-block elements
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.
Posted by: Brittany Tomaszewski | 2006.04.03 at 03:24 PM
Posted by: Brittany | 2006.04.06 at 10:43 AM
Posted by: PabloBM | 2007.02.14 at 09:59 AM
Posted by: Jason Meridth | 2007.09.23 at 10:02 PM