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

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -