I have the following code that runs every time a user submits a form on my site.
I want to change it a bit so that it checks the performance of the view and is based on the presence of a specific keyword, runs some code.
My code is as follows:
$("form").submit(function() { //do some generic stuff var formAction = ""; //get the action of the submitted form if (formAction.indexOf('keyword') !== -1) { //do some specific stuff for these forms } });
How do I get the action from the form that caused this call?
Elie
source share