File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 9465

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
I agree. Here's the link:
subject: Change URL on button click
jQuery in Action, 3rd edition