|
I want the following simple thing to work, but i can not make it work:
If a user enters "1" in the text box (name='user'), clicking the button should open Yahoo, other wise it should open Hotmail.
i dont know where the problem is, can anyone help me please?
this is the code:
-----------------------
<html>
<head>
<script LANGUAGE="JavaScript" type="type/javascript">
function Student()
{
if (document.theform.user.value==1)
{
document.open("http://www.hotmai.com");
}
if (document.theform.user.value!=1)
{
document.open("http://www.yahoo.com");
}
}
</script>
</head>
<body>
<form name = "theform">
Password:
<input type="text" name="user">
<input type="button" value="Enter Your Personal Page" onClick="Student()" >
</form>
</body>
</html>
-----------------------------
|
|
|
hi
use either
<script LANGUAGE="JavaScript" >
or
<script type="type/javascript">
it will work.
|
|
|
|
|
|
|
|