Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forum:
Struts
automatic form submit
debraj mallick
Ranch Hand
Posts: 188
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hi all,
i am trying to submit form using javascript, my code is like
<s:form action="automaticsubmit" method="post" name="mysubmit" id="mysubmit"> <input name="password" type="hidden" value="pass" /> <input name="password1" type="hidden" value="pass1" /> </s:form> <script type="text/javascript"> $(document).ready(function() { $('#mysubmit').submit(); }); </script>
but it is not working, so i tried with onload="submit()" inside body tag
<script type="text/javascript"> function submit(){ $('#mysubmit').submit(); } </script>
also i have tried with
document.form[0].submit(); //and var me = document.getElementById("mysubmit"); me.submit();
but nothing is working, any suggestion would be great.
Willie Smits increased rainfall 25% in three years by planting trees. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Default Enter key and submit BUTTON
Form input type=hidden - is it possible to set values dynamically
Need to pass Javascript Array to Struts 2 Action
Tricky form problem glad for any ideas or tell me its not possible
Submit Methods pulling same data
More...