[Javascript] Re: Appending an input to a form in Internet Explorer

Matthew Palmer mpalmer at hezmatt.org
Wed Mar 23 19:28:20 CST 2005


On Wed, Mar 23, 2005 at 06:19:18PM -0300, German Sibay wrote:
> Hello, I´m trying to append an input field to a form.. seems easy.
> 
> It works on Mozilla but it does not in IExplorer.

Oooh!  I had this problem a month or two ago.  Check the archives.  Short
answer: IE's DOM is different to Mozilla's DOM.  Let me dig up the code I
eventually used... <clicky click>

Oh, wait.  Possibly the same (or a similar) problem, but a different
implementation.  I had issues with appending to tables -- IE uses TBODY and
Mozilla doesn't.  I was also appending form elements, though, hence my
initial confusion.

I think you might be going about things a bit the wrong way.  I didn't
append the new form element to the form itself, but rather to the location
in the document I wanted the field to appear.  Since that part of the
document was under the form element anyway, all was good -- come submit
time, the form magically[1] read all of the elements under it and submitted
them all just as $DEITY intended it.

- Matt

[1] Actual magic content may vary.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050324/41488f1a/attachment.pgp>


More information about the Javascript mailing list