• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Auto-submit <form> to a servlet.

 
Bitan Biswas
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need to submit a <form> from a jsp page when time is over. i have a countdown timer with java. when the timer goes to 00:00, submit <form> to a servlet.
please help me giving by a code.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bitan Biswas wrote:i need to submit a <form> from a jsp page when time is over. i have a countdown timer with java. when the timer goes to 00:00, submit <form> to a servlet.

Java and JSP are not going to help you at all with this. Once the page is sent to the browser, there's no more server-side code running. Please read this article to understand how JSP operates.

please help me giving by a code.

That's not how things work here at the Ranch. You write the code, and we help you with problems you are having with it.

Some hints to get you going:
  • JavaScript window.setTimeout() can be used to trigger a handler after a specific delay.
  • There's a .submit() method on the form element that can be used to cause the form to submit under script control.
  •  
    Sharon Melissa
    Greenhorn
    Posts: 5
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    @ bear

    Thanks for sharing this article on JSP
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic