Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-03-2003, 02:13 AM   PM User | #1
zoobie
Senior Coder

 
Join Date: Jun 2002
Location: ColoRockyz
Posts: 1,642
Thanks: 1
Thanked 0 Times in 0 Posts
zoobie has a little shameless behaviour in the past
NS audio

This works fine for IE...but is there a simple way to include it for NS6+? I tried putting <embed> in there...didn't work...Thanks

<script>
function play(s){
document.all.tags('bgsound')[0].src=s
}
</script>
</head>
<body>
<bgsound src="">
<input type="button" value="CHIPS" onClick="play('chips.wav');">
<input type="button" value="HELP" onClick="play('help.wav');">
__________________
Zoobie or not Zoobie...That is the problem.
<body onUnload="flush( ! )">
zoobie is offline   Reply With Quote
Old 07-03-2003, 02:29 AM   PM User | #2
Skyzyx
Regular Coder

 
Skyzyx's Avatar
 
Join Date: Aug 2002
Location: Silicon Valley, CA
Posts: 980
Thanks: 0
Thanked 0 Times in 0 Posts
Skyzyx is on a distinguished road
Well, nothing but IE understands document.all. That's your first problem. Now, assuming all of the HTML is correct, this script should work (in theory... don't have time to test):

Code:
<script language="javascript" type="text/javascript">
<!--
function play(s)
{
	document.getElementsByTagName('bgsound')[0].src=s;
}
//-->
</script>
This *should* work in every DOM-capable browser. Of course, I'm not sure if bgsound is a valid tag...
__________________

Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.
Skyzyx is offline   Reply With Quote
Old 07-03-2003, 04:22 AM   PM User | #3
zoobie
Senior Coder

 
Join Date: Jun 2002
Location: ColoRockyz
Posts: 1,642
Thanks: 1
Thanked 0 Times in 0 Posts
zoobie has a little shameless behaviour in the past
Nah...Most scripts want the poor NS schmoe to download a plug-in...and by the time he goes thru 4 offsite pages, he's completely lost and can't get back to my site.

I'm thinking an array with a doc.write...
__________________
Zoobie or not Zoobie...That is the problem.
<body onUnload="flush( ! )">

Last edited by zoobie; 07-03-2003 at 04:29 AM..
zoobie is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:13 AM.


Advertisement
Log in to turn off these ads.