[jQuery] Re[jQuery] cognize iframe form submit

2008-04-29 Thread dynamic web dev


Greetings All! 

I have a form in an iframe that I need to run a function on when the form is
submitted.  This same procedure occurs on a form that isn't located in an
iframe and it works great. 

Now, I am able to submit the form within the iframe using jquery as follows
(this code is located in an included js file): 

  jQuery(winBody.document.frmName).submit(); 

 [winBody determines whether or not the form is in the iframe] 

Once submitted, I need to run a function: 

   jQuery(this.frmName).submit(function() { 
alert('activity_top: ' + this.method); 
jQuery('.fld').each(function() { 
this.value = unformatVals(this.value); 
}); 
return inProcess(this); 
});   

BUT, this function is not being called when the form submits - it completely
bypasses the above code.  When I change ".submit" to ".keyup", the function
triggers as it should. 

Why isn't the submit call being recognized?  It has something to do with the
iframe, because it works on the forms that aren't in iframes... 

I need a nudge in the right direction, please help...
-- 
View this message in context: 
http://www.nabble.com/Recognize-iframe-form-submit-tp16960319s27240p16960319.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Form Submit Function

2008-04-30 Thread dynamic web dev


Trying to run a function when a form in an iframe is submitted.  The form is
submitted from a parent frame.  When running the function from within the
iframe (button on the form), the submit function works as it should.  When
submitting the form from "outside" the form, the submit function does not
run.  

It seems as if the iframe is hindering the page from catching the function. 
When using keyup instead of submit on the same function, it works like a
charm!  

-- 
View this message in context: 
http://www.nabble.com/Form-Submit-Function-tp16982072s27240p16982072.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.