...

View Full Version : getElementById is not a function



lbjvg
12-08-2009, 02:29 PM
Hi -

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:o.

Please help. Thanks, Jim

hdewantara
12-09-2009, 08:31 PM
Works fine on my FF3.5.3 and my pc has Java6 installed, enabled.
On the contrary, your office probably hasn't :)

Regards,

lbjvg
12-10-2009, 03:16 AM
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

longman
12-10-2009, 08:13 PM
Have you tried putting inverted commas in the getElement part?

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

lbjvg
12-11-2009, 04:59 PM
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

hdewantara
12-11-2009, 05:12 PM
:thumbsup: You're welcome.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum