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.
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    New Coder
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts

    mouseover in Mozilla

    My mouseover - sound works in IE , but it doesn't work in Mozilla. Is there something wrong with the code?

    http://www.languagelearninglinks.org...agecatalan.htm

    thank you,

    man rui

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,474
    Thanks
    6
    Thanked 980 Times in 953 Posts
    Quote Originally Posted by yangmanrui View Post
    Is there something wrong with the code?
    Yes, almost everything is wrong. http://javascript.about.com/od/hints.../a/worst_4.htm

    <bgsound> is MS proprietary (i.e. it works only in IE anyway) and has never been part of any HTML standard, and hence, shouldn’t be used. <object> is intended to include multimedia on websites.
    Last edited by VIPStephan; 01-07-2008 at 05:27 PM.

  • #3
    New Coder
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Would you mind suggesting some place where I could find a better code for MousOver sound?

    Man rui

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,474
    Thanks
    6
    Thanked 980 Times in 953 Posts
    OK, there is no way to play a sound on mouseover across all major browsers. The method you were using is very out-dated and works only in Internet Explorer. And all sources promoting a method use this or some similar deprecated methods that all don’t work in Mozilla based browsers (and I doubt that Safari will work).

    On this note you shouldn’t do it with a mouseover anyway. What happens if a user accidentally mouses over several links? it would play all sounds a the same time which can be very annoying. What happens if the user has no mouse (browsing with keyboard, using mobile phone/PDA)? S/he won’t hear anything. Users with screen readers? Forget it!

    The only cross-browser compatible solution is to use small Flash objects (buttons) that play the sound onclick, i.e. when the user actually wants to play it (with whatever device s/he is using).

    There are many players out there but two of them seem to be kinda what you need. However, you still might wanna look for other players.


  • Users who have thanked VIPStephan for this post:

    yangmanrui (01-09-2008)

  • #5
    New Coder
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Just out of curiosity, don't you think that this mouseover feature is very nice and useful? Wouldn't it be helpful if Mozilla adopted it?


    man rui

  • #6
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    ...No.

    I don't have time for a full blown story now, but basically HTML [HyperText Markup Language] is governed by the W3C. It makes the standards we use. The method you're using is non-standard, and it's highly unlikely that it will be adopted by Mozilla.

    Then again, it has adopted the use of <blink> and <marquee> (click if you dare!)

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by CyanLight View Post
    Then again, it has adopted the use of <blink> and <marquee> (click if you dare!)

    Hahah!!! Too funny.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #8
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,474
    Thanks
    6
    Thanked 980 Times in 953 Posts
    Quote Originally Posted by yangmanrui View Post
    Just out of curiosity, don't you think that this mouseover feature is very nice and useful? Wouldn't it be helpful if Mozilla adopted it?


    man rui
    You can play a background sound if you put an object element into the head of your document. I haven’t tried it thoroughly but it won’t paly a sound on mouseover of a link because setting the value of the data attribute with JS won’t start the clip yet. It requires a reload of the page. However, with some AJAX this could be possible…

  • #9
    New Coder
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Can you "nominate" a tag to those people in W3C organization so they would think about it? It is still an organization so, I assume that some of their decisions are also politically based or not?


    Man rui

  • #10
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by yangmanrui View Post
    Can you "nominate" a tag to those people in W3C organization so they would think about it? It is still an organization so, I assume that some of their decisions are also politically based or not?
    Man rui
    yes their decisions are also politically based:
    1. Many times Microsoft have to two member in one commision despite the fact that other have only one and after the draft become recomandation, same Microsoft don't respect the recomandation.
    2. is hard to make standards when developers don't follow them and w3c have no choice, some time they must take some decision very hard to understand, see html5 for details

    best regards

  • #11
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Generally the needs are assessed adequately by those in the respective Working Group of the standard.

    According to the guys there MS has shown a big turnaround in their willingness to accept standards, and indeed are pushing at it more every time. Give them some credit...

  • #12
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by CyanLight View Post
    Generally the needs are assessed adequately by those in the respective Working Group of the standard.

    According to the guys there MS has shown a big turnaround in their willingness to accept standards, and indeed are pushing at it more every time. Give them some credit...
    yes, ms make big changes last years. My post was more against politics, ms was the 'victim' because of the thread subject

    best regards

  • #13
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,274
    Thanks
    28
    Thanked 271 Times in 265 Posts
    Quote Originally Posted by yangmanrui View Post
    Just out of curiosity, don't you think that this mouseover feature is very nice and useful? Wouldn't it be helpful if Mozilla adopted it?
    I believe that you can already achieve this effect by loading a sound file within a hidden iframe element or by using a technology such as Flash.

    Quote Originally Posted by CyanLight View Post
    Then again, it has adopted the use of <blink> and <marquee> (click if you dare!)
    I believe that the blink element originated with Netscape and that Mozilla is an offshoot of Netscape, so support for the blink element isn’t surprising.

    Quote Originally Posted by yangmanrui View Post
    Can you "nominate" a tag to those people in W3C organization so they would think about it?
    There’s already an audio element in the HTML 5 draft [1] [2]. The HTML 5 working group membership is open to the public, so it is possible to nominate a new element too, provided that you’re willing to take the time to explain how it should work.

    1. http://www.whatwg.org/specs/web-apps...deo.html#audio (WHATWG Working Draft, multi‐page version)
    2. http://www.w3.org/html/wg/html5/#audio (W3C Editor’s Draft)
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #14
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Quote Originally Posted by Arbitrator View Post
    I believe that the blink element originated with Netscape and that Mozilla is an offshoot of Netscape, so support for the blink element isn’t surprising.
    Not even a smile? Yeah, but it didn't have to support the blink element. It's just bad taste.

  • #15
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,274
    Thanks
    28
    Thanked 271 Times in 265 Posts
    Quote Originally Posted by CyanLight View Post
    Not even a smile?
    Well, it was amusing… and absolutely hideous. :p

    I made a slight “improvement” to your demo: http://www.jsgp.us/demos/cf130841.html. Try it out in Mozilla Firefox (2.0.0.11) or Safari (3.0.5&#160;Windows&#160;beta) for the full effect. You might just kill yourself.

    Edit: It seems to work in Opera (9.25) and Win. Internet Explorer (~7) now sans overflow: hidden, for whatever reason.

    Quote Originally Posted by CyanLight View Post
    Yeah, but it didn't have to support the blink element. It's just bad taste.
    True. They didn’t maintain legacy support for the layer element and blinking can be achieved via CSS (since CSS1) now.

    The marquee element should be replaceable by CSS eventually too, thanks to the CSS3 Backgrounds and Borders module. I’m not sure whether or not I should shudder at the prospect.
    Last edited by Arbitrator; 01-13-2008 at 09:25 AM. Reason: See the post.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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