File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Creating a hyper link on On 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 "Creating a hyper link on On Submit Button" Watch "Creating a hyper link on On Submit Button" New topic
Author

Creating a hyper link on On Submit Button

ZEESHAN AZIZ
Ranch Hand

Joined: Jan 15, 2001
Posts: 162
Hi, When users click the submit button, I want to first validate the form, and if that data is valid, I want users taken to the next page. I have tried writing hyperlink in Submit button code, but it is not working. I will be obliged if anyone guides me how to get it working. Code is as under.

input action="hre" type="button" value="Check"
href="file:///a:/test1.htm"
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944

How about that?
Don't forget to take the space out of on Click before trying this. UBB won't let me submit without the space!
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 828
Bodie,
Just wondering why you had the getElementById there instead of just using "myform" directly?
Rob
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I think that it makes the script more readable and easier to debug. Generally I get a reference to some object at high up in the DOM at the top of my scripts and store it. Then I use that in my javascript. It saves me later from having to wonder if I'm referencing an element by name or id, if by name, then which am I getting, or was it a custom Javascript object...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating a hyper link on On Submit Button