.submit(); form submit not working - Jquery

161
Views
1
Answers

I have a form which has to be submitted by jQuery after some data manipulation. say like..

$(function(){

    $("input#email]").val("myemail@email.com");
    $
('#myform').submit();    
});

But the form is not submitting.. any suggestions??

edit | flag
Askamoeba Member
Asked on: Jan 29, 2012 at 4:55AM

1 Answers

111
4
111

The Solution to this issue is to check the submit button of your form

If it is like

input type="submit" name="submit" />

then change it to

input type="submit" name="submitform" />

Changing the name of element from submit to some other value will make your form to submit using jQuery.

edit | flag
Gokul A
Answered on: Jan 29, 2012 at 4:59AM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags