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
  1. #1
    New Coder
    Join Date
    May 2005
    Location
    Cebu, Philippines
    Posts
    46
    Thanks
    1
    Thanked 10 Times in 10 Posts

    Question Background Sound using html. (Simple Problem)

    Hi,

    Can you help me if what is the problem of this code?
    <BGSOUND SRC="file:///d:/Songs/MP3mix/Jan/Wav Files/ted3.wav" loop="infinite">

    Or do you have any other idea to embed a background sound using HTML?

    Please email me your answer at anotherjygz@yahoo.com

    Thanks a lot and God Bless...

    Jygz

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    bgsound will only work in Internet Explorer. If you are asking why it doesn't work for other people is because the song is on your hard drive. You have to upload the song to your server and then go from there. You can use the embed tag.
    Code:
    <embed src="yoursong.wav" hidden="true" autostart="true" loop="true"></embed>

  • #3
    Regular Coder
    Join Date
    May 2004
    Location
    Minneapolis, MN, USA
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The main problem is that your SRC attribute is pointing to a file on the local machine. You'll want to use a relative (sound.wav) or absolute (http://server.com/sound.wav) path for that to work.

    The other problem is that <bgsound> is a proprietary tag created by Microsoft. It is not standard HTML, and neither is <embed>. Try <object>.

    Previous post came while I was composing mine, so this is redundant, but yes...


  •  

    Posting Permissions

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