Actually in this case parents('form') of the clicked object does not
include the form tag itself and I believe it's due to the poor html
structure. I just tested this out.

On Jan 17, 2:15 pm, Alex Kachayev <kacha...@gmail.com> wrote:
> If I undestood the task right, you can create code in such way.
>
> You form will be like this:
>
> <table><tr>
> <form action="http://jquery.com"; method="post" id="myForm">
> <td>
> <input value="submit" type="submit" onclick="conversion(1000, this);
> " />
> </td>
> </form>
> </tr>
> </table>
>
> Convertion(1000, this) will return:
>
> true, if it`s neccesary to submit form.
> false, in other case.
>
> For this question: 'Is there  another way to get to the form tag by
> traversing elements in reverse order? '.. But "parents('form')"
> returns reverse order...

Reply via email to