Results 1 to 4 of 4

Thread: javascript doesn't work in my computer but work in other computer

  1. #1
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    456
    Thanks
    76
    Thanked 21 Times in 21 Posts

    Post javascript doesn't work in my computer but work in other computer

    what happen with my computer:
    Code:
    <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 ...

  2. #2
    Join Date
    Jul 2007
    Location
    Azerbaijan, Baku
    Posts
    144
    Thanks
    11
    Thanked 27 Times in 25 Posts

    Default

    I think your JavaScript disabled.

  3. The Following User Says Thank You to allahverdi For This Useful Post:

    davelf (08-24-2009)

  4. #3
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    456
    Thanks
    76
    Thanked 21 Times in 21 Posts

    Default

    do you mean the configuration? so where do i must change?
    I make that code with textpad. thx a lot for replying..

  5. #4
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    456
    Thanks
    76
    Thanked 21 Times in 21 Posts

    Default

    my bad, i forget to allow my block at ie...
    everything ok now...
    hahaha, my stupid mistake.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •