File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Add a link to submit button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Add a link to submit button " Watch "Add a link to submit button " New topic

Add a link to submit button

shivang sarawagi
Ranch Hand

Joined: Jun 19, 2008
Posts: 153
I want to navigate to another page when i click the submit button. Can anyone help me in this, how do i do it ??

below is my code

Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 445

Use Document.href to load a different page.

Note: Not sure if this is deprecated.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

Clicking the submit button will submit the form to the URL specified by the action. If that's not what you want, don't use a submit button in the first place.

Perhaps you can explain more about what you are really trying to accomplish?

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Add a link to submit button
It's not a secret anymore!