This is a demo of file ajax2.html

Here we have a form that will be submitted to its action URL (ajax2results.html) and results from the server (here in demo we have no server, so we just load static HTML file) will be displayed in hijacked element (tab, dialog etc).

Hijacking forms requires jQuery form plugin (link will open in current page and not in hijacked element, because it has nohijack class).

To skip submitting form, do something like this where you are doing validation (e.g. in its submit() handler):
$(form_element).data('skip', true);. This will prevent submitting the form. Unfortunately, simply returning false from submit() handler is not enough - jQuery Form plugin submits it anyway.

Page was loaded at: