I've been tasked to create a (smallish) JSP/servlet application to run targetted on iPaqs (thus in PDA). So far it's going decently well, but I'm running into a problem with some pages that need to send html forms back to the server from different buttons (with different actions being executed based on the button pressed). For example, the code (JSP) I have so far is as follows (irrelevant stuff removed for brevity):
The onclick (put in a _ to please the forum engine) events don't seem to set the form element value clicking the buttons, the expected actions aren't executed (one would set some data on the server and return to this page, the other set the data and forward to another page). Any idea what I'm doing wrong here? It works fine in IE6 (the only access to a PDA to test on is one that someone else in the company has which I can have a look at a few times a day, still fighting to get one on my workstation).
42
Pauline McNamara
Sheriff
Joined: Jan 19, 2001
Posts: 4011
posted
0
Is it OK to have 2 submit buttons for one form?
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15003
posted
0
you might want to try to use regular buttons instead of submit buttons; and call the form to be submitted: document.formName.submit(); Not sure if that will work or not. Eric
Jeroen Wenting
Ranch Hand
Joined: Oct 12, 2000
Posts: 5093
posted
0
I mapped the submits into the request, giving them all the same name attribute. On the server I can now just check that attribute and get the value of the button clicked (thus identifying it). Thinking of putting the button texts in a ResourceBundle to recover the complete separation of display code and logic code...
subject: how to set a form value programatically on PIE