• 0

embed music on webpage


Question

Here is what i have so far:

<!-- Settings -->

<div id="Settings" class="center">

Theme Music: <a href="java script: setCookie('music','yes',40);">On</a> <a href="java script:setCookie('music','no',40);">Off</a><br>

</div>

I have this under a settings segment to turn the music on and off. Clicking on doesn't start the music.

<!-- Theme Music -->

<script language="text/javascript">

if (getCookie('music') == 'yes')

{

document.write('<embed src="theme.mp3" volume="25" hidden autoplay="true" loop="true" cache="true">');

}

else

{

}

</script>

And this is the responding code. The music doesn't start when the webpage is loaded either. The song I want to play is in the base directory and is named "theme.mp3"

Any tips would be great on why it isn't working

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.