jquery - How to force the proper order with my javascript -
ok have javascript/jquery
$('.next').click(function(e){ e.preventdefault(); var table = $('table.active'); var form = table.find('form'); form.submit(); window.location.href = '/some/location'; });
the problem in browsers safari
being 1 of them form.submit()
never gets called.
my guess async request , never gets chance call.
any ideas on how this. tried following
form.submit(function(){ window.location.href = '/some/location'; });
but didnt work
you need like
$(function() { $('.next').click(function(e){ e.preventdefault(); var table = $('table.active'); var form = table.find('form'); $.post(form.attr("action"),function() { window.location.href = '/some/location'; }); }); });
with parameters try
$.post(form.attr("action"),form.serializearray(),function() {
Comments
Post a Comment