SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Newbie: Stop Sound?

    Uggh ... I haven't used javascript in years and am really rusty. I have an embeded MP3 on my site that is set to autostart. I have given it the name 'mySound".

    When a user clicks on a link (which calls a m3u file and then streams a song) I would like the embeded sound to stop
    So I have the following code
    <a href="song1.m3u" onclick="stopsound();">song one</a>

    and in the head section I have
    <script type="text/javascript">
    function stopsound()
    {
    document.mySound.stop
    }
    </script>


    This isn't working ... any ideas of what it could be would be very much appreciated!

  2. #2
    SitePoint Addict CommanderZ's Avatar
    Join Date
    Apr 2006
    Location
    Czech Republic
    Posts
    236
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You may destroy the object using removeChild function.

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can someone give me an example of how to do this? Or any other solution to my original problem?


Bookmarks

Posting Permissions

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