advertisement

Article:
  Build a Simple MP3 Player for Your Site
Subject:   Pop-up player
Date:   2006-11-23 07:57:46
From:   steadygarcia
Hi there,
I tried using the code you supplid for the pop up mp3 player manually, and I got the small orange op-up box. But when I press the play button, nothing happens? Do I need to modify the areas in the javascript file (soundpop.js) where it reads "+ soundfiledesc +" and "+ soundfilepath +" to actually contain the description and path? I tried that, and when I did, I no longer get the small pop-up window, rather, I get a full Windows Media Player launch which then plays the music file. Same thing when I use your Dreamweaver extension to create the javascript. It works, but no small box; rather, WMP launches and plays the file. On my Mac, I do get a small pop-up player to launch, but it also lanches a full blank browser window along with it.


Any ideas?


Thanks!
LC

Full Threads Newest First

Showing messages 1 through 2 of 2.

  • Pop-up player
    2006-11-23 08:01:31  steadygarcia [Reply | View]

    Further to my message above, using the Dreamweaver extension to createthe op-up player didn't seem to create a separate js file. At least I couldn't find one. Do I need to manually add the "<script language="JavaScript" type="text/javascript" src="soundpop.js"></script>" line in the head of my document? The Dreamweaver extension didn't seem to add this line.
    Thanks again.
    LC
    • David Battino photo Pop-up player
      2006-11-23 14:11:35  David Battino | O'Reilly Blogger [Reply | View]

      Yes, you need to add the script tag to the head of your document. That was one of the first Dreamweaver extensions I wrote and I neglected to add that feature.

      You shouldn't have to modify the external JavaScript file, though, unless you want to customize the look of the pop-up window. It's designed to read the values passed from the link, which lets you use multiple links on the same page. See the example HTML file in the download for details.

      The double-window behavior indicates that you omitted return false from the link.