javascript - intercept form submit response -


i want intercept form's submit response via javascript. submit done submit button or jquery's .submit() (with no params). there way intercept submit response like;

.submit().done(callback) 

i know .submit() not have support this, creating post request finding every input in form , getting values data object pass .post() method seems bit clumsy me. besides there no advantage of using <form> tags in html in approach.

any suggestions this?

no, can't.

besides, when .submit() or click submit button, page unloads , new page loads. means java script on page gone there no point in having callback.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -