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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    getElementById is not a function

    Hi -
    Code:
    function EvalSound(soundobj) {// this passes the sound to be played to the java applet embedded in the html file and plays it. see ref: http://www.phon.ucl.ac.uk/home/mark/audio/play.htm
     
      document.getElementById(soundobj).Play();
    }
    I get a firebug error message 'getElementB...ay is not a function'.

    However, this error only occurs on my machine at work where I am running Firefox for U3 (updated to FF 3.5.5) - U3 is a SanDisc flash drive.

    When I run the same code on FF 3.5.5 from home there is no error. The code works in all other browsers I've tested (IE6, IE8, Chrome).

    The page is http://dermdudes.com/counter/keycounter.html
    Please provide feedback if the page does not work for you.

    Please help. Thanks, Jim

  • #2
    Regular Coder hdewantara's Avatar
    Join Date
    Aug 2009
    Location
    Jakarta, Indonesia.
    Posts
    375
    Thanks
    9
    Thanked 55 Times in 54 Posts
    Works fine on my FF3.5.3 and my pc has Java6 installed, enabled.
    On the contrary, your office probably hasn't

    Regards,

  • Users who have thanked hdewantara for this post:

    lbjvg (12-11-2009)

  • #3
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by hdewantara View Post
    Works fine on my FF3.5.3 and my pc has Java6 installed, enabled.
    On the contrary, your office probably hasn't

    Regards,
    Thanks - you are probably on to something, I'll have to check that out. - Jim

  • #4
    New Coder
    Join Date
    Mar 2007
    Posts
    98
    Thanks
    24
    Thanked 4 Times in 4 Posts
    Have you tried putting inverted commas in the getElement part?

    document.getElementById("soundobj").Play();

  • #5
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    9
    Thanks
    3
    Thanked 0 Times in 0 Posts

    java update was needed to resolve the issue

    hdewantara - you were correct about the java 6 not being installed on the office computer. I called IT and they upgraded to the current version and now the site functions correctly. Thanks! - Jim Gallagher

  • #6
    Regular Coder hdewantara's Avatar
    Join Date
    Aug 2009
    Location
    Jakarta, Indonesia.
    Posts
    375
    Thanks
    9
    Thanked 55 Times in 54 Posts
    You're welcome.


  •  

    Posting Permissions

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