Open GoogleCodeExporter opened 9 years ago
Why not just use a true id attribute for the form?
Original comment by msgilli...@gmail.com
on 18 Jan 2010 at 9:02
If you have the follow form, the original code work fine:
<form id="theform" method="post" action="myscript.php">
<input type="text" name="email" id="email" />
<input type="text" name="repeatemail" id="repeatemail" />
</form>
But if you have the follow form, the original code fails and you must use the
fix
provided by me:
<form id="theform" method="post" action="myscript.php">
<input type="hidden" name="id" value="someid" />
<input type="text" name="email" id="email" />
<input type="text" name="repeatemail" id="repeatemail" />
</form>
I explain the problem of the original code: if the page contain a form and
exist some
element with id attribute as id, the page.id access to the id HTMLElement and
not to
the id attribute of the form. Is for this reason that the first code work fine
but
the second, no.
I use a true id attribute on the form and all cases that not use the id
HTMLElement
work fine but if you add a HTMLElement with id attribute as id, the code don't
work
as expected.
Original comment by josepsan...@gmail.com
on 18 Jan 2010 at 11:03
Original issue reported on code.google.com by
josepsan...@gmail.com
on 14 Jan 2010 at 11:15