Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating a hyper link on On Submit Button

 
ZEESHAN AZIZ
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bodie,
Just wondering why you had the getElementById there instead of just using "myform" directly?
Rob
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic