-
September 20th, 2002, 07:17 AM
#1
Button Onclick does not work!
Hi, everyone!
Please look at the following codes,
--------
<html>
<head>
</head>
<form>
<input type="button" value="button" name="B1" OnClick="b.html">
</form>
</Html>
--------
I want to guide user to view a new page (b.html) when
clicking button "B1". But the above codes do not work.
How to resolve the trouble?
Cheers,
George
-
September 20th, 2002, 09:33 AM
#2
Try this...
<form>
<input type="button" value="button" name="B1" OnClick="window.navigate(b.html);">
</form>
-
September 23rd, 2002, 03:20 PM
#3
The window.navigate() method will not work on Netscape, so if your user base includes Netscape users then you should use the window.location property instead:
<form>
<input type="button" value="button" name="B1" OnClick="window.location='b.html';">
</form>
-
September 25th, 2002, 03:52 AM
#4
Netscape
Apologies. In my line of work, it's too easy to forget about Netscape - or indeed any other non-microsoft browser. Thanks to Websmith for putting me right.
-
September 27th, 2002, 12:26 PM
#5
valid XHTML :
Code:
<form action="">
<input type="button" value="Google" onclick="location.href = 'http://www.google.com';" />
</form>
Last edited by Zvona; September 27th, 2002 at 12:44 PM.
Zvona - First aid for client-side web design
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|