Hi,
I'm making my band's website and I was wondering if anyone can tell me how I can make a simple way of a new window opening when the link is clicked, with one of those sort of mini WMP things in where it can play a mp3.
Cheers,
Hugo.
Printable View
Hi,
I'm making my band's website and I was wondering if anyone can tell me how I can make a simple way of a new window opening when the link is clicked, with one of those sort of mini WMP things in where it can play a mp3.
Cheers,
Hugo.
okay, two seperate things.
first you need to make the pop-up funtion.
something like this in your <head> will workin that script, there are some obvious parameters that you can modify to resize the pop-up window, adjust the dimensions, etc.HTML Code:<script type="text/javascript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=1,width=210,height=210');");
}
</script>
then you want to be able to make a link cause the pop-up to open, so a link would work like thislast, on the page that's going to open the file, you would use a code similar to this, in order to actually play the file in the browser.HTML Code:<a title="Listen" href="javascript:popUp('m.html')">Listen</a>
I've attached the quick & dirty example files.HTML Code:<object id="Player"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="some.wav" />
<param name="autostart" value="true" />
</object>
Cheers mate,
It's in the 'Music' section at:
http://www.whistler.tz4.com
if you want to check it out.
Hugo.