Results 1 to 5 of 5

Thread: What Does This Error Mean?

  1. #1
    Join Date
    Oct 2008
    Location
    Brooklyn, NY
    Posts
    27
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default What Does This Error Mean?

    At the bottom of my IE7 browser the little "Error" icon is showing up for this page - http://americanchic.net/testpage.html . Here is the error:

    (not sure whether or not this is technically code so I just put it in a block anyway)
    Code:
    Line: 166
    Char: 1
    Error:'ie4' is undefined
    Code: 0
    URL:  http://americanchic.net/testpage.html
    And another error:
    Code:
    Line: 216
    Char: 1
    Error:'ie4' is undefined
    Code: 0
    URL:  http://americanchic.net/testpage.html
    What does this mean and how do I fix it?

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    I'm unable to see the error's cause since refreshing it removes the error. Usually, this is cause by the unnecessary comment strings:
    Code:
    <!-- ******* BEGIN IMAGE GALLERY SCRIPT ******* -->
    
    <script type="text/javascript" src="jquery.js"></script>
    
    <script type="text/javascript">
    $(document).ready(function(){
    
    	$("h2").append('<em></em>')
    
    	$(".thumbs a").click(function(){
    	
    		var largePath = $(this).attr("href");
    		var largeAlt = $(this).attr("title");
    		
    		$("#largeImg").attr({ src: largePath, alt: largeAlt });
    		
    		$("h2 em").html(" (" + largeAlt + ")"); return false;
    	});
    	
    });
    </script>
    
    <!-- ******* CLOSE IMAGE GALLERY SCRIPT ******* -->
    
    
    
    <!-- ******* BEGIN POP-IT MENU SCRIPT ******* -->
    Find time to rectify highlighted with just:
    Code:
    <!--COMMENT HERE-->
    ...if problem still exists, get back.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There is nothing wrong with those comments. The suggested replacements however should contain spaces:

    Code:
    <!-- COMMENT HERE -->
    I am currently getting no error from the page in IE 7. When it was giving the error, it's pretty straight forward what it was about. A script on the page was trying to access a variable named ie4 that either wasn't defined, or whose definition had been changed to undefined or to something that was undefined after it was defined and before it was accessed.

    I see in the source code:

    Code:
    var ie4=document.all
    as long as that occurs before ie4 is accessed and nothing contradicts it, the error should not occur.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by rangana View Post
    That answer wasn't very good, unless you are looking for humor, and even then it was a bit lame, because it gave some false information:

    Your version of IE7 is pretending it never heard of IE4- like what Microsoft will do about Vista in a year or so.

    Nothing to worry about, but I would switch to firefox, which, when it doesn't understand something, doesn't brag about it.
    This assumes error reporting on in IE 7 and off in FF. These are settings any user may adjust to his or her own preference.

    And the IE 7 browser wasn't pretending it didn't know about IE 4, it hasn't, no browser has. It was in fact reacting to an error in the code (which presumably has since been corrected), code that just happens to be using 'ie4' (a bad choice in variable names to begin with) incorrectly as a named variable.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •