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 4 of 4
  1. #1
    New Coder
    Join Date
    Nov 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    works in FF, not in IE

    Warning: Newbie question

    The following web page works fine in FireFox, not in IE though:

    http://www.puzuki.com/motion_art.html

    I'm stumped. I'm a self-taught coder and I really need this to work. Can you help?

    I attached the javascript file.
    Attached Files Attached Files
    Last edited by Papaphreaky; 11-10-2006 at 11:55 PM.

  • #2
    Banned
    Join Date
    May 2006
    Location
    England
    Posts
    664
    Thanks
    0
    Thanked 84 Times in 84 Posts
    Quote Originally Posted by Papaphreaky View Post
    I'm stumped. I'm a self-taught coder
    Then I would suggest that you teach yourself to pay close attention to the JS console. In this case the line number reported refers to 'motion_art.js'.
    document.getElementsByTagName is being passed an id and therefore not returning an array.

  • #3
    New Coder
    Join Date
    Nov 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Arty:

    Ok. Thanks.

    I have been watching the JavaScript console. My apologies for not mentioning this.

    I don't understand what is wrong with the JS code. I uploaded the JS file (it has a .txt extension for uploading to the forums).

    This is the line of code that is problematic for IE:
    var section=sectionGroup[0].getElementsByTagName('video');


    What is wrong with this?

    :Pat

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    1. <video> is not a valid name for a tag.
    2. You don't have any of that tag in your page in any case and so there wouldn't be any tags to find even if it were a valid tag.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

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