I have a form that I need to enhance it with JQuery Ajax. Currently, its using javascript to handle submission. When the user hits the submit button, the control is going to a javascript function and the javascript function does some processing and then does the form-id.submit().
Now how can I introduce JQuery-ajax to the current form? I don’t want to recreate the whole javascript function in JQuery and then do the JQuery submit. Is there a way to pass the form object/values to Jquery in existing the javascript function and then do the submission using Jquery-ajax?
Thanks.
There’s a jQuery plugin for that. http://jquery.malsup.com/form
Use the
beforeSubmitoption to execute your pre-submit function.