[Project_owners] finding the <form/> of an <input/>

Ramiro Aparicio frisco82 at gmail.com
Tue Mar 21 21:07:35 EST 2006

I have seen similar forms in the past the problem is that it seems that FF
does not like forms defined between <table> and <tr> it must be outside
<table></table> or inside a td. But i found using the dom inspector that the
input element have a form atribute that returns the owner form element that
is correct in this case so you can change that recursive function and use
instead a simple atribute call.

On 3/21/06, Eric H. Jung <grimholtz at yahoo.com> wrote:
> Hi,
> Given an <input/> field, I'm trying to determine the <form/> in which it's
> contained. I've written
> this recursive function:
> /** Returns null if there is no form **/
> findForm : function(node) {
>   // |node| is an <input type="text"/> field
>   if (node.nodeName == "FORM")
>     return node;
>   return node.parentNode ? this.findFormName(node.parentNode) : null;
> },
> This works for all pages I've tried except this one:
> http://passwordmaker.org/proto/eraseme.html.
> In that case, the function returns null. I don't understand why it's not
> working. Anyone care to
> take a look?
> Thanks in advance,
> Eric
> Use Your PC To Find a Cure for
> Cancerhttp://members.ud.com/services/teams/team.htm?id=68C9E079-8285-495F-8598-D73352CC7075And
> Join Team Lulu
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners

Hasta Otra

Ramiro Aparicio

Webmaster de http://gs151.tk y http://www.climaxsl.es
Desarrollador de FoxGame http://foxgame.mozdev.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20060321/8c28fc91/attachment.htm

More information about the Project_owners mailing list