Re: Sound and script

by "Gary Warren" <warren.webdesign(at)ukonline.co.uk>

 Date:  Mon, 16 Aug 1999 23:08:13 +0100
 To:  <Reywob(at)aol.com>,
"HTML Guild Basic" <hwg-basics(at)hwg.org>
 References:  aol
  todo: View Thread, Original

Hi Peter,

Try the following code.

<html>
<head>
<script language="JavaScript">
function playWave(){
bsound.src = mfile.src}
</script>
</head>
<bgsound id="bsound" src="" loop="1">
<body bgcolor="#ffffff">
<input type="hidden" id="mfile" src="sound.wav">
a href="JavaScript:playWave()">Play Wave</a><p>
<input type="button" value=" Play Wave " onclick="playWave()">
</body>
</html>

HTH

Regards
Gary
Cellnet SMS 07712846647(at)sms.genie.co.uk (140 Chr max)
warren.webdesign(at)ukonline.co.uk
warren.webdesign(at)u.genie.co.uk

Gary Warren. - Warren Webdesign MBCI IE-NN-WebTV
Free Web Design Utilities -- Win95/98/NT Applications
http://web.ukonline.co.uk/warren.webdesign/index.html
http://you.genie.co.uk/warren.webdesign/index.html

SE'99 Sample Explorer over 230 free source code examples
http://web.ukonline.co.uk/warren.webdesign/samdex.htm
http://you.genie.co.uk/warren.webdesign/samdex.htm

"What I know today, is yesterdays ignorance"



----- Original Message -----
From: <Reywob(at)aol.com>
To: <hwg-basics(at)hwg.org>
Sent: 16 August 1999 20:16
Subject: Sound and script


Hi,

I want to play a sound when someone clicks on a link on my side menu.
However I'm not sure how to do that.  Do I need to use javascript, and if so
does anybody have or know of any that I could use.  I've tried embedding the
sound in the pages, but then it doesn't play when you click on the link.
The
site is at http://members.aol.com/reywob/

TIA
Peter.

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA