How To Change Form Url Parameter On Submit?
I have this form for processing..
Solution 1:
jQuery
$('button[type=submit]').click(function(e){
e.preventDefault();
e.stopPropagation();
window.location = "http://sites.com/driver/" + $('#search').val();
returnfalse;
});
or
$('form').submit(function(e) { // you really need to class/ID your form// all that code
});
Now this is quick and dirty to give you the idea. You'd of course want to sanitize your input (good idea to do that on the front-end as well as the back-end).
Post a Comment for "How To Change Form Url Parameter On Submit?"