homepage Welcome to WebmasterWorld Guest from 54.196.218.113
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
OnMouseover Link w/ Sound WITHOUT using Anchor Tags
Sound with CSS or A:Hover Exist?
Paul Woodley




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

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

 

tedster




msg:1188313
 4:57 pm on Feb 3, 2001 (gmt 0)

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?

mivox




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

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!

tedster




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

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.

mivox




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

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.

Brett_Tabke




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

Opera 5 supports hover Tedster.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved