File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Two submit buttons. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Two submit buttons." Watch "Two submit buttons." New topic
Author

Two submit buttons.

Sham Grandhe
Ranch Hand

Joined: Dec 16, 2003
Posts: 73
Hi Friends,
This is Sham, iam working on a project, with similar framework as that of struts.
The problem that iam facing is that, i have two submit button one for moving back in an application flow and the other for moving forward. On hitting enter in the mid way of fill an application by default the back button is striked i want to strike the continue button by default.

Thank you in advance,

regards
Sham
s penumudi
Ranch Hand

Joined: Nov 17, 2004
Posts: 113
I think in a form when one hit "enter", the first submit button gets invoked.

In your scenario, make your back button of type "button" instead of "submit" and onClick through javascript submit your form. By this when user clicks on back button your form will get submitted and if he hits "enter" forward submit button gets invoked.

hope this helps
[ May 23, 2005: Message edited by: s penumudi ]
 
 
subject: Two submit buttons.
 
Similar Threads
JSF page works perfect only for the first time
history.back() not retaining changed values in previous page after window.open() call
Clicking button in Httpunit
Submit button problem
IE back button