Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Build a Simple MP3 Player for Your Site
Subject:   onLoad for mp3 player
Date:   2006-12-27 04:31:07
From:   jim7002
I've tried several different methods to open the player using the onLoad (instead of onclick) prompt but can't get it to work...any ideas?


This is nice mp3 plyaer I might add as well.


Thanks

Full Threads Oldest First

Showing messages 1 through 4 of 4.

  • David Battino photo onLoad for mp3 player
    2006-12-27 05:08:38  David Battino | O'Reilly Blogger [View]

    Jim: Two common errors people make include omitting the link to the external JavaScript file and not "escaping" apostrophes in song titles. (Raw apostrophes will break the script, so you need to precede them with backslashes. See the demo file in the download.)

    Popping up the player automatically when the page loads could annoy visitors, but it should be possible. I used a similar technique at BambooSoul.com to play a random clip from the artist's CD every time someone visits.
    • onLoad for mp3 player
      2006-12-27 10:16:01  jim7002 [View]

      Alright, now I'm getting frustrated with myself. All of your examples work fine...the problem I'm forcing upon myself is having the link work onLoad. In other words, using your example, when you click on Poppin Fresh MP3...the link works fine, but I'd rather have it open onLoad (without the need for clicking). I've changed everything I can change to make it work that way with no success. I'm working on a Joomla site and I want the background music to play through out the viewers experience through the site, with the ability to turn it off if necessary. So what I have done is to set joomla in a directory by itself and using a redirect page to open and then go to Joomla. That way the loading page stays in the background (as long as it is open) and the music continues.

      Thanks,
      Jim
      • David Battino photo onLoad for mp3 player
        2006-12-27 19:04:21  David Battino | O'Reilly Blogger [View]

        Jim: The problem may be a pre-existing onLoad event; if you'd like to send me a link privately, I'll take a look.
    • onLoad for mp3 player
      2006-12-27 05:53:32  jim7002 [View]

      Wow, thank you for such a timely response. I'll give it a try in a little while. The Dreamweaver MXP is great and I want to thank you for contributing.