/    Sign up×
Community /Pin to ProfileBookmark

how can i make this script actually work?:

<html>
<body>
<script type=”text/javascript”>
function play()
{
song = document.slist.value;
self.document.write(“<bgsound src='”+song+”‘>”);
}
</script>
<script type=”text/javascript”>
function stop()
{
self.document.write(“<bgsound src=”>”);
}
</script>
<select name=”slist”>
<option value=song04.wav>Song 1</option>
<option value=song06.wav>Song 2</option>
</select>
<br>
<input type=”button” onclick=”play()” value=”Play”>

<input type=”button” onclick=”stop()” value=”Stop”>
</body>
</html>

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Mr_JJul 29.2003 — Please try the following



[SIZE=1]

<html>

<body>

<script type="text/javascript">

function play(){

song = document.f1.slist.value;

track.src=song

}



function stop(){

track.src=""

}

</script>

<form name="f1">

<select name="slist">

<option value=song04.wav>Song 1</option>

<option value=song06.wav>Song 2</option>



</select>

<br>

<input type="button" onclick="play()" value="Play">

<input type="button" onclick="stop()" value="Stop">

</form>



<bgsound id="track" src="">

</body>

</html>







[/SIZE]
Copy linkTweet thisAlerts:
@xataku_nakusuteauthorJul 30.2003 — thanx!!!

it worx!!!

its alive!!!!

? ? ? ? :p
×

Success!

Help @xataku_nakusute spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...