Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Needing an Alert box to pop up at a specific time!

  1. #11
    Join Date
    Jul 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John.....My apologies to you, and yes it works like a charm, and I put that test page up to see if it would work, wasn't aware that it has to be seperated by a greater amount of time.....now you have solved all of my problems!!

    Thanks

  2. #12
    Join Date
    Oct 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Dear Professor
    This realy a perfect javascript I'. looking for.
    But is is possible to add to it specific date.
    I have several events in:
    jan 4
    jan 14
    feb 12
    feb 16
    june 16
    the script you wrote works fine for several events in one day
    is it possible to add to it the same events in sevral days of the year.
    So I don't have to update it.
    thanks

  3. #13
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    82
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Sorry, but if you want the best results, you should make your own thread...

  4. #14
    Join Date
    Sep 2018
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default input the time

    Quote Originally Posted by jscheuer1 View Post
    This should do it then, place anywhere on the page:

    Code:
    <script type="text/javascript">
    function breakTime(){ // <<< do not edit or remove this line!
    /* Set Break Hour in 24hr Notation */
    var breakHour=9
    /* Set Break Minute */
    var breakMinute=5
    /* Set Break Message */
    var breakMessage="Reports! Take Your Break!"
    ///////////////////No Need to Edit//////////////
    var theDate=new Date()
    if (Math.abs(theDate.getHours())==breakHour&&Math.abs(theDate.getMinutes())==breakMinute){
    this.focus();
    clearInterval(breakInt)
    alert(breakMessage)
    }
    }
    var breakInt=setInterval("breakTime()",58000)
    ////////////////////////////////////////////////
    </script>
    I'd like to know how you can input the specific time on each breaks on the page itself if your break time changes everyday.

  5. #15
    Join Date
    Sep 2018
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    How can I input the time on the webpage since my break time changes everyday?

  6. #16
    Join Date
    Jan 2009
    Location
    NH
    Posts
    659
    Thanks
    96
    Thanked 26 Times in 26 Posts

    Default

    make a brand new thread asking your question and put all of the details there. this is a 13 year old thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •