This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

submit form problem

 
manasa teja
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Eric Sexton
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this a question about using the <html:form> tag in Struts?
 
manasa teja
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PLEase help me on this..
i appreciate it
 
Priyanka Chopda
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic