This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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).
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
Joined: Oct 12, 2000
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...
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: how to set a form value programatically on PIE