[jQuery] Re: $(form).submit() validation and multiple forms

2009-09-29 Thread Jeremy Darling
I found my very stupid mistake. I wasn't checking the type within updateControls when I setup the submit event. Thus if I used a DIV that contained the form two submits got fired, one for the div and one for the form. Of course the DIV isn't really a form so it iterates the entire document. Tha

[jQuery] Re: $(form).submit() validation and multiple forms

2009-09-29 Thread Nalum
try changing this: within = within ? $('#' + within) : $(document); to this: within = typeof(within) != 'undefined' ? $('#' + within) : $ (document); On Sep 29, 5:33 pm, Jeremy Darling wrote: > Sorry, guess it would help if I explained within :).  The actual full method > is: > function updateC

[jQuery] Re: $(form).submit() validation and multiple forms

2009-09-29 Thread Jeremy Darling
Sorry, guess it would help if I explained within :). The actual full method is: function updateControls(within){ within = within?$('#'+within):$(document); within.submit(validateForm); within.find(".datepicker").datepicker(); within.find("form").submit(validateForm); within.find(".datepi

[jQuery] Re: $(form).submit() validation and multiple forms

2009-09-29 Thread Nalum
Try changing within to $('form'). I haven't come across within so I don't know anything about it. On Sep 29, 4:45 pm, Jeremy wrote: > I have built out a fairly rhobust app using jquery and jquery-ui all > was going well until we started to bring different screens together > inside a tabbed inte