Jump to content
Killersites Forums

"turning webcams on and off" at different times of day


blowfly123
 Share

Recommended Posts

I thought I had a sweet, simple Javascript function to turn a webcam on and off depending on the time of day but I guess it's more complicated than I thought. So I sort of have two questions.

 

1) Is this the right tactic? If so, how can I fix it? What am I missing?

2) If this is wrong, how should I do it?

 

Thanks.

 

Go here: http://tinyurl.com/nrxwtm and then click webcam or add ?page_id=3 to the URL

 

The code is essentially this:

 

 ')
}
else if (now.getHours()     document.write('')
}
else if (now.getHours()     document.write('
 ')
}

else {
   document.write('')
}
//-->

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...