Welcome to WebmasterWorld Guest from 54.166.33.25

Forum Moderators: not2easy

OnMouseover Link w/ Sound WITHOUT using Anchor Tags

Sound with CSS or A:Hover Exist?

   
4:47 am on Feb 3, 2001 (gmt 0)

10+ Year Member



Hi! Wondering if anyone has done this or knows how? I am looking to have a sound produced when the user passes mouse over a link. (Not an image!)
Thing is I DO NOT want to use anything in the ANCHOR tags (<a href>). Thereby hoping this might be achieved via CSS with the AHover tag.
Anyone done this or know how?
Thanks.
-pW
4:57 pm on Feb 3, 2001 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Paul, as far as I know a:hover is only supported by MSIE, and even in that case only for color changes to the link text. Hover was inconsistently supported in MSIE 4.x, and support only truly arrived in Explorer version 5.

Since you said you don't want to add anything to the A HREF tag, I assume you know that the effect you want can be created through JavaScript, using "onmouseover" to trigger sound. As far as I know, this is your only choice right now. Still, many people would love to hear of a success using another method, I'm sure.

Even using Javasript, browser compatibility is a concern. Here [wsabstract.com] is one method that is cross browser compatible.

I don't claim the definitive word on whether a:hover can trigger a sound in MSIE. Anyone know anything more about this?

7:37 am on Feb 4, 2001 (gmt 0)

WebmasterWorld Senior Member mivox is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I noticed (weirdo that I am, on a Mac with Netscape) two possible problems with the script you referenced, tedster:

1. It starts Java when you mouseover the link... hence it takes forever on older machines.

2. It didn't work at all for me, even after I waited for Java. Gave a Javascript error. It may be cross-browser compatible on Windows, but it definitely doesn't work in NN 4.7/Mac.

I tried forever to find a way to initiate a remote imagechange using jscript/onmouseover *without* using <a href=> and could never find a way to make it work.

I'd LOVE to find out a way to do mouseover effects without having to hyperlink the trigger though... I'll be watching this one to see what turns up!

9:34 pm on Feb 4, 2001 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



On Windows the JVM loads immediately with the page, it doesn't wait for a mouseover to start up. That's an important difference on a Mac. Thanks!

Java is pretty common for embedding sound files -- other methods are too browser specific, but now you've pointed to platform issues as well. One of my friends has a nice g4, and he has constant problems playing music from the web, with either browser.

That javascript error you mentioned interests me a lot - I am on the hunt for more Mac javascript info. Does the Mac version of Netscape come with a js console to get more specific error messages? On Windows you can type javascript: into the location window and get a pop-up console that helps in debugging.

10:45 pm on Feb 4, 2001 (gmt 0)

WebmasterWorld Senior Member mivox is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Actually, I just discovered the Mac NN javascript console the other day.... I never noticed the status bar javascript error message before. Oh, the time I could have saved if only I'd know earlier!

using an embed tag (instead of bgsound) allows music to play automatically upon loading a page for Mac NN/IE... I prefer silence on the web, so I really haven't looked into online sound much.

11:29 am on Feb 5, 2001 (gmt 0)

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Opera 5 supports hover Tedster.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month