Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Struts and the fly likes submit form problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "submit form problem" Watch "submit form problem" New topic
Author

submit form problem

manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
In jsp , i have a text box, where the user entes some name and clicks teh submit button
Then, results will be displayed in teh same page. At the bottom of teh page,
I have a update button.
The selects a radio button in the results row and clicks "update" button , which should take the user to anoter page.
How to do this..
Do I need use javascript.. what are the best ways to do this.. How to go to a different page, when user cliks the button..


MT
Eric Sexton
Ranch Hand

Joined: Sep 12, 2003
Posts: 133
Is this a question about using the <html:form> tag in Struts?
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
Yes.. Sorry , i should have about mentioned about it..
Basically my problem is this
I have a jsp page for search results page.
in the JSP, initially, only one Text box and submitsearch button will be displayed. The user enters teh employee name and clicks on Search button.
It will go to database and fetch teh results (liek Emp no, Tel. No, Department etc). and am pagination also for this also.
Now, at the bottom of the results, i am displaying buttons for Update, New etc.

So , the end user selects one row ( radio button) in te results and clicks on teh update button. Here only, i am strcukup
When teh user clicks on Update button, I need to go to another page, where I can update emp details.
How to this. Do i need to use java script for update button's onclick event.. how to acive this..
please give me exmaples, how to go abt it..
[ October 17, 2003: Message edited by: manasa teja ]
manasa teja
Ranch Hand

Joined: May 27, 2002
Posts: 325
PLEase help me on this..
i appreciate it
Priyanka Chopda
Ranch Hand

Joined: Jul 22, 2003
Posts: 112
hi
When teh user clicks on Update button, I need to go to another page, where I can update emp details.
How to this.

you can create a hidden field in your form i.e. just before your update button giving <input type="hidden" name="update"/>

Now in struts-config.xml you can call appropriate action and from that action return fwd mapping which corresponds to page abc.jsp to this action.
Does that help?
-PC
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: submit form problem
 
Similar Threads
Subit the form with html:link
How to impl close button in Struts?
how to load a page into other via ajax in JSF
submitting a form
pagination problem