Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: NS audio

  1. #1
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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( ! )">

  • #2
    Regular Coder Skyzyx's Avatar
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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...
    Last edited by zoobie; 07-03-2003 at 04:29 AM.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •