PDA

View Full Version : javascript doesn't work in my computer but work in other computer



davelf
08-24-2009, 03:26 AM
what happen with my computer:


<html>

<head>
</head>
<script language="javascript">
function daftar()
{
var nama=formPendaftaran.txtNama.value;
var pass=formPendaftaran.txtPass.value;
var add=formPendaftaran.txtAdd.value;
if(nama=="")
{
alert("name please")
formPendaftaran.txtNama.focus();
}
else if(pass=="")
{
alert("password please")
formPendaftaran.txtPass.select();
}
else if(isNaN(pass))
{
alert("password must number")
formPendaftaran.txtPass.select();
}
else if(pass.length!=6)
{
alert("Password 6 digit please")
formPendaftaran.txtPass.select();
}
else if(add=="")
{
alert("address please")
formPendaftaran.txtAdd.focus();
}
else
alert("success")
}


</script>
<link href="style.css" rel="stylesheet" type="text/css">
<body class="body">
<form name="formPendaftaran">

<table class="border" align="center">

<tr>
<td colspan="2" class="font2" align="center">
Pendaftaran Anggota
</td>
</tr>
<tr>
<td class="font">
Nama :
</td>
<td>
<input type="text" name="txtNama"></input>
</td>
</tr>
<tr>
<td class="font">
Password :
</td>
<td>
<input type="password" name="txtPass"></input>
</td>
</tr>
<tr>
<td class="font">
Alamat:
</td>
<td>
<textarea name="txtAdd" rows="5" cols="20"></textarea>
</td>
</tr>
<td align="center" colspan="2">
<input type="button" name="btn1" value="Daftar" onClick="daftar()"></input>
<input type="reset" name="btn2"></input>
</td>
</tr>


</table>

</form>
</body>
</html>


Even with this simple javascript, my computer doesn't work, and don't show any alert when i validate it. But when i try it on my laptop nothing wrong, it's work perfectly.

So what happen with my computer and how to make it right, thx a lot ...

allahverdi
08-24-2009, 06:40 AM
I think your JavaScript disabled.

davelf
08-24-2009, 07:38 AM
do you mean the configuration? so where do i must change?
I make that code with textpad. thx a lot for replying..

davelf
08-24-2009, 11:50 AM
my bad, i forget to allow my block at ie...
everything ok now...
hahaha, my stupid mistake.:D