PDA

View Full Version : Wav files


mjg9171
01-22-2004, 01:36 PM
I have a wav file set to play on my homepage. all of the other pages on my site have a link to return to the homepage, so the wav file plays every time a visitor returns to the home page.

is there a code to make the wav file play only the first time?

Ian
01-23-2004, 01:14 PM
Hi, I havent heard of a ready made code or script as such but it could be done by using a cookie. It would only work if the visitor has cookies enabled though. What would happen is the first time they opened the page the wav file would run and a cookie would be placed on the visitors computer, the next time they opened the page it would check for the cookie and if it was there it would not run. The cookie could be set to expire daily or any time or once per browser session.
Sorry I dont have a cookie script to offer, maybe someone here has one and can taylor it to your requirements. Or maybe someone has a better idea, I hope this helps a bit anyway. Good luck