can $.post mirror action='' of form?
i don't want make multiple $.post functions, action='' changes user selects he/she wants submit in menu system. so, need 1 $.post function if url changes dynamically action='' does.
$("#txtrform").submit(function(){ $.post('{*action*#txtrform}', $("#txtrform").serialize(), function(data) { $("#col3").load("/include/txtrpbox/feed.php"); $('input#txtrinput').val(''); }); return false; });
$("#txtrform").submit(function(){ $.post($(this).attr('action'), $(this).serialize(), function(data) { ... }); return false; });
Comments
Post a Comment