Question:

I need to create a pop up window for my site that pops up only on a Tuesday, how would I do this?

by  |  earlier

0 LIKES UnLike

I want to make a pop up window advertising a show on my internet radio station, and I only want it to pop up on a Tuesday (all day). What code would I use to do this, and does anyone have any examples? Thanks!

 Tags:

   Report

2 ANSWERS


  1. u'll have to write a bit of java script. i cant tell you the script tho since i've never actually writen it out myself but i do know u need to write one saying that u want this to pop up on this day untill this day


  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

            "http://www.w3.org/TR/html4/loose.dtd">

    <head>

    <script type="text/javascript">

    <!--

    function checkday(wantedday){

    var currentTime = new Date()

    var day = currentTime.getDay()

    //Day of the week(0-6). 0 = Sunday, ... , 6 = Saturday

    if (day==wantedday) {

    popup("test.html",currentTime);

    }

    }

    function popup(url,date) {

    id = date.getTime();

    eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0, scrollbars=0, location=0, statusbar=0, menubar=0, resizable=0, width=300, height=100');");

    // Or whatever size or document you want

    }

    //-->

    </script>

    </head>

    <body onLoad="javascript: checkday(2)" >

    </body>

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions