Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2004
    Posts
    713
    Thanks
    6
    Thanked 2 Times in 2 Posts

    problem with onBlur

    Hi,please help, i am always getting "object expected"

    Code:
    <HTML>
    <HEAD>
    
    <link rel="stylesheet" href="style.css" type="text/css">
    
    <script language="text/javascript">
     
    function checkuser(){ 
    	alert("haha");
    } 
    </script>
    
    </HEAD>
    <body bgcolor=#B6DF52 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
    <center>
    
    <div style="text-align:center;padding-top:30px;padding-bottom:30px;">
    <form class="cssform" name="registration" method="post" action="register.php">
    <p>
    <label for="user">Username</label>
    <input type="text" name="username" value="" class="highlight" onBlur="checkuser()"/><span id="checkusername"></span>
    </p>
    <p>
    <label for="user">Password</label>
    <input type="password" id="userpass" value="" />
    </p>
    
    <p>
    <label for="comments">Contact Number:</label>
    <input type="text" id="contact" value="" />
    </p>
    
    <div style="margin-left: 120px;">
    <input type="submit" value="Submit" name="submit" /> <input type="reset" value="Reset" />
    </div>
    
    </form>
    
    
    </div>
    
    </body>
    </html>
    flying dagger

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    <script language="text/javascript">

    function checkuser(){
    alert("haha");
    }
    </script>
    Change to
    Code:
    <script type="text/javascript">
     
    function checkuser(){ 
    	alert("haha");
    } 
    </script>
    Use a proper Doctype to your document and use lowercase for tags(html, head)
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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