[thelist] Cross browser help with JavaScript to trigger .wav file.

Christian Heilmann codepo8 at gmail.com
Thu Dec 8 13:13:50 CST 2005


> If you can give me advice on how to include Mac Users and Mozilla users by viewing my JavaScript at
> http://64.239.40.156/i-wish/sound.html  I would be most grateful.
>
> Notes:
> 1.) Several people using Mozilla and Safari browsers have reported that they see the buttons, but, can't hear anything.  Is there a fix?
> 2.) Although minor, is there a way to get the cursor to change to a hand when mousing over the buttons?

Your JavaScript hails from a time when dinosaurs roamed the earth and
the tar pits were forming. You check for either document.all which is
MSIE or netscape navigator, that is why none of the newer browsers do
support it. Furthermore, you repeat the functions over and over in the
body instead of just using one function and the sound to be played as
a parameter and you have several forms with the same name, which is
invalid HTML.

My advice: Simply link the sound file and let the visitor decide what
program to play the sound in. Embedding sound cross-browser is
nowadays really only possible with Flash.

To make something show a hand when the visitors hovers over it you add
the pointer value to the cursor selector in CSS:

input{cursor:pointer;}

--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/



More information about the thelist mailing list