aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes submit button only works once? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "submit button only works once?" Watch "submit button only works once?" New topic
Author

submit button only works once?

rich werth
Ranch Hand

Joined: Sep 21, 2001
Posts: 57
Hello again
I am having some trouble calling a servlet more than once. I am posting here first bcuz it doesn't get to the servlet more than once(doesn't call post method)
What I am doing is grabbing a list it has x number of items in it and I am displaying them in a browser page 5 at a time. I am using a submit button in a form to do this
<form name="form1" method="post" action="glControl">
<input type="submit" name="button" value="Next">

</form>
This only works once, then it doesn't call the servlet again?? Why doesn't it?
I get to go to page 2 and see items 6-10 and that's it. On other presses it just refreshes the screen.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Have you checked at the server side to make sure it isn't hitting the servlet? The 'page refersh' you are seeing may be the servlet sending the same data back each time.
The problem is the almighty page caching issue, but I think that's less likely. To eliminate the caching problem, add this to your servlet

Dave
rich werth
Ranch Hand

Joined: Sep 21, 2001
Posts: 57
Hi Thanks for the reply
It wasn't going to the servlet bcuz my stupid cache setting in netscape said not to check for pages.
I chaned it and it works fine now
 
Don't get me started about those stupid light bulbs.
 
subject: submit button only works once?