Jump to content

Help For Making of form


kkj55

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...