I tried making a button that had an alert and also sent you somewhere. I've gotten the alert to work, but the link doesn't.
Here is how I did it:
<a href="page2.html" onClick="alert('What am I doing wrong?');">
<input type="button" name="link" value="Click Here">
</a>
If anyone knows what I am doing wrong or if there is a better way to go about this I would be much obliged.
Eamon
sorry, i forgot to use special characters so my code wouldn't execute. Here you go.
<input type="button" name="link" value="Click Here" onClick="alert('What am I doing wrong?');location.href='http://www.google.com/'">
Posted by: RyanN on January 23, 2003 08:34 AMYou didn't provide the full context, but the button also has to be enclosed within form tags for it work consistently.
Posted by: Liz on January 27, 2003 04:59 PM