hugoharding
04-12-2005, 11:29 PM
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.
sparsely
04-13-2005, 12:38 AM
okay, two seperate things.
first you need to make the pop-up funtion.
something like this in your <head> will work
<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>
in that script, there are some obvious parameters that you can modify to resize the pop-up window, adjust the dimensions, etc.
then you want to be able to make a link cause the pop-up to open, so a link would work like this
<a title="Listen" href="javascript:popUp('m.html')">Listen</a>
last, 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.
<object id="Player"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="some.wav" />
<param name="autostart" value="true" />
</object>
I've attached the quick & dirty example files.
hugoharding
04-13-2005, 10:27 AM
Cheers mate,
It's in the 'Music' section at:
http://www.whistler.tz4.com
if you want to check it out.
Hugo.
Powered by vBulletin® Version 4.2.3 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.