php - how to receive form data submitted with jquery submit() -


how can form data if form submitted jquery submit() function? example

<form action="<?=$php_self;?>" method="post" id="someform"> name: <input type="text" name="name" id="name" /><br /> email: <input type="text" name="email" id="email" /><br /> </form> 

which submit jquery like:

$("#someform").submit(); 

how can receive fields name , email if form submitted? thanks

just use $('#name').val() , $('#email').val() in submit callback(

$('#form').submit(function() {     alert($('#name').val()); }); 

for example)


Comments

Popular posts from this blog

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -