Quantcast
Channel: how to match javascript onSubmit with jQuery submit? - Stack Overflow
Viewing all articles
Browse latest Browse all 4

how to match javascript onSubmit with jQuery submit?

$
0
0

i have a form

<form id="add_list_form">    ...</form>

then with jQuery i can do:

$("#add_list_form").submit(function(){    $(this).serializeArray()});

and this will work.

but if i use onSubmit:

<form onsubmit="addListForm(event);">    ...</form>function addListForm(e){    $(this).serializeArray()}

it doesn't seem to work, in my case i get serialized some other form from my page witch i think is an bug

Any ideas how can i accomplish the same effect like jQuery submit event?


Viewing all articles
Browse latest Browse all 4

Trending Articles