Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button onclick event

Status
Not open for further replies.

vttech

Technical User
Jan 28, 2006
297
0
0
US
I created a button with the code below
Code:
<button>New</button></p>

I know that the button tag has an onclick event. I was wondering if without using javascript that I could have it open a link to another page? If so how is it done?

<a href="index.html">


Newbie in search of knowledge
 

Since the OnClick event is a Javascritp action no, but you can use a submit button instead of a normal button wrapped in a form to achieve the same thing:
Code:
<form action="destination.html" method=POST target="_blank">
<input type=submit value="NEW">
</form>

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top