How do I stop a background sound playing on a page when it is reloaded?
Apr 5th, 2008 20:05
ha mo, Colin Fraser, Mike Gadd,
The short answer is you cannot. The reason for this is actually simple,
and very obvious if you think about it. However, if you are playing
sounds using scripts then you should be knowledgable enough to try these
possible solutions :
1. Set a cookie that has a short lifespan, say working on the user's
current date for example.
2. Create a function that writes the sound code after checking the date
set on the cookie. If the two dates match, do not play the sound, if
they do not match then play the sound.
1. Use 2 frames to create your page set, one permanent one not
2. Using a variable in the permanent frame as a flag to play or not play