Does Submit() Function Has A Callback?
I have this code, and a file upload form which is submited to a frame: setMyCookie('name','value_1'); $('.myform').submit(); setMyCookie('name','value_2'); Problem: Webkit browser
Solution 1:
No. Submitting a form loads an entirely new page, which usually ends the current execution context for the script.
The exception is if you submit the form to a frame, in which case an onload event will fire.
Solution 2:
Yes, you can. See here.
Solution 3:
You would have to use AJAX to accomplish that. Otherwise, the form is submitted and the rest of the JavaScript that your function was going to execute is ignore because the page is reloaded.
Post a Comment for "Does Submit() Function Has A Callback?"