Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 05, 2012 03:22 AM by dhol.gaurav
Member
563 Points
142 Posts
Nov 01, 2012 07:32 AM|LINK
Hi I want to submit below HTML form automatically using Jquey How??
<form action="@Url.Action("Control", "Controller")" id="f2" method="post">
<input type="hidden" value="@StrXML" name="Data" /><form>
Thanks in Advance
Magesh
Contributor
3998 Points
725 Posts
Nov 01, 2012 08:38 AM|LINK
hey
check below code, it may help you
<script type="text/javascript"> jQuery(document).ready(function($) { $("#f2").submit(); }); </script>
let me know if any query
Nov 01, 2012 10:49 AM|LINK
I have tried your code but its not working for me..
myCode
<script type="text/javascript" src="../../Scripts/jquery-1.4.4.min.js" >
jQuery(document).ready(function ($) { $("#f2").submit(); });
</script>
Nov 01, 2012 10:56 AM|LINK
Hey,
You did mistack in including jQuery library and script update below code with your code
Include script is different and page script are in different tag, put script in buttom of the page in include library put in head tag
<script type="text/javascript" src="../../Scripts/jquery-1.4.4.min.js" /> <script type="text/javascript"> jQuery(document).ready(function ($) { $("#f2").submit(); }); </script>
Nov 01, 2012 01:44 PM|LINK
Hi I have followed your procedure but still i am failing...
Is there any other way to achieve this??
All-Star
30184 Points
4906 Posts
Nov 01, 2012 03:11 PM|LINK
Hi,
The above procedure should work. $("#formid").submit(). What error you are getting?
Nov 02, 2012 05:51 AM|LINK
I am not getting any error but form submit not happens!
Thanks
Nov 02, 2012 06:14 AM|LINK
Install firebug plugins of firefox it will show you the error in console tab, it will help you to get error.
Nov 04, 2012 02:08 PM|LINK
Hi I found the issue now
When i use this <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>working fine!!!
But previously I have used this <script type="text/javascript" src="../../Scripts/jquery-1.5.1.min.js"></script> which was fails.
Why this happen???
Nov 05, 2012 03:22 AM|LINK
There are many possibilites of that issue, without debuging it is not possible to say why this issue is happened.
mageshsoftte...
Member
563 Points
142 Posts
Auto Form Submit-Jquery
Nov 01, 2012 07:32 AM|LINK
Hi I want to submit below HTML form automatically using Jquey How??
<form action="@Url.Action("Control", "Controller")" id="f2" method="post">
<input type="hidden" value="@StrXML" name="Data" /><form>
Thanks in Advance
Magesh
Regards
Magesh.
Senior Software Developer.
dhol.gaurav
Contributor
3998 Points
725 Posts
Re: Auto Form Submit-Jquery
Nov 01, 2012 08:38 AM|LINK
hey
check below code, it may help you
<script type="text/javascript"> jQuery(document).ready(function($) { $("#f2").submit(); }); </script>let me know if any query
Gaurav Dhol
Skype ID : dhol.gaurav
If My Post contains helped you, Please Mark as Answer
mageshsoftte...
Member
563 Points
142 Posts
Re: Auto Form Submit-Jquery
Nov 01, 2012 10:49 AM|LINK
I have tried your code but its not working for me..
myCode
<script type="text/javascript" src="../../Scripts/jquery-1.4.4.min.js" >
jQuery(document).ready(function ($) {
$("#f2").submit();
});
</script>
Thanks in Advance
Regards
Magesh.
Senior Software Developer.
dhol.gaurav
Contributor
3998 Points
725 Posts
Re: Auto Form Submit-Jquery
Nov 01, 2012 10:56 AM|LINK
Hey,
You did mistack in including jQuery library and script update below code with your code
Include script is different and page script are in different tag, put script in buttom of the page in include library put in head tag
<script type="text/javascript" src="../../Scripts/jquery-1.4.4.min.js" /> <script type="text/javascript"> jQuery(document).ready(function ($) { $("#f2").submit(); }); </script>let me know if any query
Gaurav Dhol
Skype ID : dhol.gaurav
If My Post contains helped you, Please Mark as Answer
mageshsoftte...
Member
563 Points
142 Posts
Re: Auto Form Submit-Jquery
Nov 01, 2012 01:44 PM|LINK
Hi I have followed your procedure but still i am failing...
Is there any other way to achieve this??
Thanks in Advance
Magesh
Regards
Magesh.
Senior Software Developer.
asteranup
All-Star
30184 Points
4906 Posts
Re: Auto Form Submit-Jquery
Nov 01, 2012 03:11 PM|LINK
Hi,
The above procedure should work. $("#formid").submit(). What error you are getting?
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog
mageshsoftte...
Member
563 Points
142 Posts
Re: Auto Form Submit-Jquery
Nov 02, 2012 05:51 AM|LINK
I am not getting any error but form submit not happens!
Thanks
Magesh
Regards
Magesh.
Senior Software Developer.
dhol.gaurav
Contributor
3998 Points
725 Posts
Re: Auto Form Submit-Jquery
Nov 02, 2012 06:14 AM|LINK
Hey,
Install firebug plugins of firefox it will show you the error in console tab, it will help you to get error.
let me know if any query
Gaurav Dhol
Skype ID : dhol.gaurav
If My Post contains helped you, Please Mark as Answer
mageshsoftte...
Member
563 Points
142 Posts
Re: Auto Form Submit-Jquery
Nov 04, 2012 02:08 PM|LINK
Hi I found the issue now
When i use this <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>working fine!!!
But previously I have used this <script type="text/javascript" src="../../Scripts/jquery-1.5.1.min.js"></script> which was fails.
Why this happen???
Thanks
Magesh
Regards
Magesh.
Senior Software Developer.
dhol.gaurav
Contributor
3998 Points
725 Posts
Re: Auto Form Submit-Jquery
Nov 05, 2012 03:22 AM|LINK
Hey,
There are many possibilites of that issue, without debuging it is not possible to say why this issue is happened.
let me know if any query
Gaurav Dhol
Skype ID : dhol.gaurav
If My Post contains helped you, Please Mark as Answer