If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Gateway for a kid on the net

Right now my grandson has a folder of his favorite sites (we set them up, the child is < 5yo) on IE. We are thinking of giving him his own home page with links to those sites which would become disabled at a certain time on school nights. While I know how to get the time of day and day of week, I would like to be able to easily override this for things like holidays.

Right now my grandson has a folder of his favorite sites (we set them up, the child is < 5yo) on IE. We are thinking of giving him his own home page with links to those sites which would become disabled at a certain time on school nights. While I know how to get the time of day and day of week, I would like to be able to easily override this for things like holidays.

Have an array which will contain only hours and minutes for which you want the links to be disabled. Using the 'for' loop go through the list at on load of the page. If the current hour and minute matches the one in the list then using 'getElementById' function hide the div as below.

Code:

document.getElementById('linkList').style.display='none';

Before hiding, have one more array containing list of holidays on which you dont want to hide these links. Compare the current date with this list and only if the current date doesnt fall in the list, go ahead and hide the links.

Resolved

I thank both of you for your input--I'm sorry to say I hadn't thought of using <div>'s, but that seems to be the way to go. My prototype is name.htm, replace "name" or "Name" with the child's name, fix the date of birth, change password (optional), and either provide the picture or delete the code that asks for it.

Instead of a table for holidays, I put in a password option (default is face).

Last edited by wbport; 09-17-2009 at 03:31 PM.
Reason: How to override.