This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes Change URL on button click Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Change URL on button click" Watch "Change URL on button click" New topic

Change URL on button click

kiran chirravuru

Joined: Nov 25, 2009
Posts: 26
How to change URL on <s:submit> button click in struts 2.0 using javascript

Ankit Garg

Joined: Aug 03, 2008
Posts: 9280

change URL

What do you mean by change the URL. When a submit button is clicked, the containing form is submitted to the server. Do you simply want to do some javascript on the click of a button?? No need to use struts submit button usually to do something like that. There's an onclick event on HTML button element. Also the window.location javascript property can be used to change the URL in the browser...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
It is sorta covered in the JavaRanch Style Guide.
subject: Change URL on button click
Similar Threads
How To Set Up Security
How to invoke a servlet
Open JAVA File
Change password
Login ID and Password for WebSphere admin console