Is it possible to calculate form submit URL before submit of form?
Currently I am doing it by this way:
var form = $('#myForm');
var action = form.attr('action');
var params = {};
$("input", form).each(function (index, input) { params[input.name] = input.value; });
var result = action + '?' + $.param(params);
But is there any better and simple way to doing that? Thanks
Do you mean something like this:
More info: http://api.jquery.com/serialize/