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 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2005
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation object required error in ie onClick in DIV

    So this is baffling me why this doesnt work. First here is the code i dumbed it down for IE as much as possible but still as usual IE is trowing an error.

    javascript function:
    Code:
     function showTab(){ 
    	alert(1);
    	
    }
    told you i dumbed it down.

    html code:
    Code:
    <div id="friendsTab" class="tabGrey" onclick="showTab();">  Friends </div>
    So why is this throwing a javascript Object Expected error in IE...

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    It works for me and the alert appears.

    What version of IE are you using?

    Could it be alert("1");
    Last edited by Philip M; 07-03-2007 at 07:29 PM.

  • #3
    New Coder
    Join Date
    Nov 2005
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The alert happens in FF. IE version 6.0

    the page is: http://loudermusic.com/artist.php?user=mmulligan03 and none of the JS works on this page but the function is linked to the tabs on the right

    Also i did change the alert to alert("1"); and still nothing


  •  

    Posting Permissions

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