37 users online (0 members and 37 guests)  

Thread: Website Music


  Results 1 to 3 of 3

Related

  1. Replies: 1
  2. Im looking to build or purchase a music website    Forum: Websites For Sale
    Replies: 2
  3. Website Music    Forum: HTML Forum
    Replies: 4
  4. Website music    Forum: General Discussion
    Replies: 7
  1. #1
    Glenvern's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Apr 2002
    Location
    Norfolk, UK.
    Posts
    112

    Website Music

    How can I put <bgsound> behind buttons so I can switch it on and off like the NN's <embed>

    Is there an event I can use like <OnClick>?
    or perhaps a <script>
    Last edited by Glenvern; 12-02-2003 at 04:10 AM.
    Glenvern

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Hi there Glenvern,

    Try this....
    Code:
    <html>
    <head>
    <style type="text/css">
    <!--
    input#one{position:absolute;left:300px;top:50px;}
    input#two{position:absolute;left:350px;top:50px;}
    //-->
    </style>
    <script type="text/javascript">
    <!--
    function StartMediaUp ()
        {
         document.player.url = "brick.wav";
         document.player.controls.play();
        }
    function ShutMediaDown ()
        {
         document.player.controls.stop();
        }
    //-->
    </script>
    </head>
    <body>
    
    <object id="player" height="0" width="0" classid="clsid:6bf52a52-394a-11d3-b153-00C04f79faa6">
    <param name="autoStart" value="true">
    <param name="volume" value="100">
    </object>
    
    <input id="one" type="button" name="play" value="play" onclick="StartMediaUp();">
    <input id="two" type="button" name="stop" value="stop" onclick="ShutMediaDown()">
    
    </body>
    </html>
    I have tested it in I.E. 6 and Netscape 7.1
    With a little more 'css' your can customize the buttons

    cthead

  3. #3
    Glenvern's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Apr 2002
    Location
    Norfolk, UK.
    Posts
    112

    Website Music

    Thanx Coothead it worked perfectly..
    Glenvern



Tags for this Thread