Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 19th, 2004, 11:31 PM
Authorized User
 
Join Date: Dec 2003
Location: Kansas City, Missouri, USA.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default audio onLoad

questions
I have a piece of audio on the main page that plays once when the page loads for the first time, I dont want it to play when my user visits other pages on the site and returns back to my home page either with the back button or with navigation links on the secondary pages. Is there a piece of script I can steal that will allow this,, cookies are always nice things you should share.

Thanks in advance
Larson

I think.....therefore..I code
__________________
I think.....therefore..I code
Reply With Quote
  #2 (permalink)  
Old February 20th, 2004, 06:47 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Well as you say cookies would be a solution. Write one when the suer vists the first time and check on each vist to see if they have visited within the past hour/day/week as you think fit. The only reliable way to do it though would be to have a session variable using server side code such as asp that recorded there first visit to the page and then prevented the audio being played.
As a personal preference I can't stand sites that play music spontaneously on arrival but I'm sure it's acceptable in some cases.

--

Joe
Reply With Quote
  #3 (permalink)  
Old February 21st, 2004, 12:39 AM
Authorized User
 
Join Date: Dec 2003
Location: Kansas City, Missouri, USA.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the advice, my site is used for the specific purpose of audio, I am a producer, and the site is used to showcase my talents as an audio imaging/commercial production producer. I appreciate your feedback though. Thanks for your reply

Larson

I think.....therefore..I code
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Onload with AJAX Baco Intro Programming 0 June 11th, 2007 12:46 PM
onLoad functionality NEO1976 Javascript 0 May 23rd, 2006 09:38 AM
iframe onLoad darkhalf Javascript 1 January 11th, 2006 04:42 PM
two script onLoad mateenmohd Javascript 2 December 28th, 2003 12:12 AM



All times are GMT -4. The time now is 02:01 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.