kkj55 Posted February 20, 2006 Share Posted February 20, 2006 Can Someone Help me in trying to add a hyperlink on my <input type="submit" value="Submit">? Link to comment Share on other sites More sharing options...
DarkElf Posted February 20, 2006 Share Posted February 20, 2006 I assume what you mean is that you want the user to be taken to a new page when they click the submit button. you do this by putting the url in the action attribute of the 'form' tag.It seems a bit strange that it goes in the form tag and not the input tag if you are thinking about it as a hyperlink. What actually happens is that the value of the field of the form are posted to the action page when the submit button is clicked, the user is taken there as well.For more complicated forms the action page might be in php or asp which does something functional with the values the user has input as well as displaying a new page. Link to comment Share on other sites More sharing options...
Pollux Posted February 20, 2006 Share Posted February 20, 2006 If you're not actually submitting a form though, and instead are just looking to create a button which is effectively a hyperlink (ignoring the potential usability issues), then what you'd probably want to do is use a javascript onClick event that sets the location, like so: <input type="button" onclick="top.location = 'index.html';"> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now