[jQuery] Re: Submitting a form with .submit() problems
If I undestood the task right, you can create code in such way. You form will be like this: tabletr 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...
[jQuery] Re: Submitting a form with .submit() problems
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: tabletr 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...
[jQuery] Re: Submitting a form with .submit() problems
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. It's tough to script on back markup. Different browsers will do different things in an attempt to figure out what you really meant. You can always get to the parent form of an input by accessing the input's 'form' property. var form = inputDomElement.form;