HighDots Forums  

Background music not working??

alt.html alt.html


Discuss Background music not working?? in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sally jo
 
Posts: n/a

Default Background music not working?? - 12-12-2006 , 01:58 PM






Here's the code I'm using:

<script language="Javascript">
if (navigator.userAgent.indexOf('MSIE') > -1)
{
document.write('<bgsound src="Norah Jones - Sunrise.mp3"
loop="1">');
} else {
document.write('<embed src="Norah Jones - Sunrise.mp3"
autostart=TRUE hidden=true loop="1">');
}
</script>

and here's the site:

http://cc.usu.edu/~cassia/index.html

Am I supposed to add that code to all the pages on the site?


Reply With Quote
  #2  
Old   
Travis Newbury
 
Posts: n/a

Default Re: Background music not working?? - 12-12-2006 , 02:01 PM






sally jo wrote:
Quote:
Here's the code I'm using:
Am I supposed to add that code to all the pages on the site?
I will be the first to say it.....

You are not supposed to add that code to any page on the site.....



Reply With Quote
  #3  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Background music not working?? - 12-12-2006 , 03:41 PM



sally jo wrote:
Quote:
Here's the code I'm using:

script language="Javascript"
if (navigator.userAgent.indexOf('MSIE') > -1)
{
document.write('<bgsound src="Norah Jones - Sunrise.mp3"
loop="1">');
} else {
document.write('<embed src="Norah Jones - Sunrise.mp3"
autostart=TRUE hidden=true loop="1">');
}
/script
If it isn't IE, you use a non-existent BGSOUND tag and expect it to work?

Quote:
and here's the site:

http://cc.usu.edu/~cassia/index.html

Am I supposed to add that code to all the pages on the site?

Whatever does work, of course you have to have it on each page. When you
leave a page, you leave the whole page, audio included.

But if you include it on each page, it'll start from scratch each time
the user goes to a new page.

The real answer is: it annoys users greatly to have sound unexpectedly
coming out of their browsers. How do you know they're not in a cubicle
at the office, or at a meeting, or in a library? Or maybe they're
already listening to music, or watching TV or a movie. How do you think
they'll react to your decision that they should listen to your music
instead?

If you have a neat tune you think they *might* like to listen to, give
them link to click, so they can listen to it in their music player
instead of having it play in the browser.


Reply With Quote
  #4  
Old   
cassia
 
Posts: n/a

Default Re: Background music not working?? - 12-12-2006 , 04:32 PM




Harlan Messinger wrote:
Quote:
sally jo wrote:
Here's the code I'm using:

script language="Javascript"
if (navigator.userAgent.indexOf('MSIE') > -1)
{
document.write('<bgsound src="Norah Jones - Sunrise.mp3"
loop="1">');
} else {
document.write('<embed src="Norah Jones - Sunrise.mp3"
autostart=TRUE hidden=true loop="1">');
}
/script

If it isn't IE, you use a non-existent BGSOUND tag and expect it to work?
I uploaded it again, it seems it didn't load correctly, but would that
code work? HTMLdog.com doesn't appear to have the code for adding
background music...This is for a class, and I just need to have an
"enhancement" so I thought I'd throw in music.


Quote:

and here's the site:

http://cc.usu.edu/~cassia/index.html

Am I supposed to add that code to all the pages on the site?


Whatever does work, of course you have to have it on each page. When you
leave a page, you leave the whole page, audio included.

But if you include it on each page, it'll start from scratch each time
the user goes to a new page.

The real answer is: it annoys users greatly to have sound unexpectedly
coming out of their browsers. How do you know they're not in a cubicle
at the office, or at a meeting, or in a library? Or maybe they're
already listening to music, or watching TV or a movie. How do you think
they'll react to your decision that they should listen to your music
instead?

I definitely agree...but like I said, it's just for a class. And I'm
not really sure what an "enhancement" entails....? Unless you've got
any ideas??


Quote:
If you have a neat tune you think they *might* like to listen to, give
them link to click, so they can listen to it in their music player
instead of having it play in the browser.
Great idea, so is the code that they would click to link the same as if
I were linking to another image or page?



Reply With Quote
  #5  
Old   
dorayme
 
Posts: n/a

Default Re: Background music not working?? - 12-12-2006 , 04:51 PM



In article <4u8ig6F173l6kU1 (AT) mid (DOT) individual.net>,
Harlan Messinger <hmessinger.removethis (AT) comcast (DOT) net> wrote:

Quote:
If you have a neat tune you think they *might* like to listen to, give
them link to click, so they can listen to it in their music player
instead of having it play in the browser.
No need to go quite that far, nearer is to give them a choice
though.

--
dorayme


Reply With Quote
  #6  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Background music not working?? - 12-12-2006 , 04:57 PM



cassia wrote:
Quote:
If you have a neat tune you think they *might* like to listen to, give
them link to click, so they can listen to it in their music player
instead of having it play in the browser.

Great idea, so is the code that they would click to link the same as if
I were linking to another image or page?
Yes, exactly.


Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.