Make an alert box at the beginning of every month

I'm writing a budgeting tool and at midnight at the beginning of every month I want to pop up an alert saying it is the start of a new month and enable a button in jsp.
I have tried a couple ways to do this. First I wanted to keep creating a calendar and check if the date was 1. But then this would be much more work than is needed.
Next I tried to use the TimerTask class and set a boolean to true at the first of every month, but then I couldn't figure out how to make the javascript run when the run method of that thread executes. I tried using a while loop in the jsp page itself to check the boolean but this just caused the page to hang.
A third idea I was trying is to have an invisble form with a hidden field using this boolean. I was trying to figure out a way to use onChange to trigger the javascript, but this would only work for some sort of visible input.
Anyone have any exprience on scheduling a task like this at the beginning of every month or about how to force a page to reload at a specific time? Thanks.

You could even put that in a frame with a form to navigate a seperate frame:
//frameset
<html>
<frameset frameborder="0" framespacing="0" rows="26px,*">
<frame scrolling="no" frameborder="0" marginheight="0"
    marginwidth="0" name="frameA" noresize src="testingB.jsp" />
<frame scrolling="no" frameborder="0" marginheight="0"
    marginwidth="0" name="frameB" noresize src="http://www.google.com" />
</frameset>
</html>
//then your time-important page (called testingB above)
<html>
<body>
    <script type="text/javascript">
        function navigate() {
          var navigateTo = document.forms[0].address.value;
          if (navigateTo.toLowerCase().indexOf("http://" == -1)) {
              navigateTo = "http://"+navigateTo;
          parent.frameB.location.href = navigateTo;
          return false;
        function doAlert() {
            alert("Time to do Something");
            window.location.reload(); //so it will happen again next month.
<%
    //When first created, the calendar points to now.
    Calendar cal = Calendar.getInstance();
    long curTime = cal.getTimeInMillis();
    //then, lets set it to the 1st day of the month, at 00:00:01.00 (1 second after midnight
    cal.set(Calendar.DAY_OF_MONTH, 1);
    cal.set(Calendar.HOUR_OF_DAY, 0);
    cal.set(Calendar.MINUTE, 0);
    cal.set(Calendar.SECOND, 1);
    cal.set(Calendar.MILLISECOND, 0);
    //finally, add a month to get the first second of next month
    cal.add(Calendar.Month, 1);
    long triggerTime = cal.getTimeInMillis();
%>
        //set the doAlert to occur after the # of milliseconds between now and
next month.
        setTimeout("doAlert()", <%= (triggerTime - curTime) %>);
    </script>
    //form will read address you type in input, and navigate the other frame there.
    <form onSubmit="navigate();" name="nav">
      <input type="text" name="address" size="100" style="margin:3px" />
      <input type="submit" name="Go" value="Go" style="margin:3px" />
    </form>
</body>
</html>

Similar Messages

  • I have been a loyal customer for years and have a hot spot because internet options are very limited in our rural area.  I have stayed with 10G since the beginning.  Most months I don't use the 10G.  Verizon has no problem with me paying for Data I don't

    I have been a loyal customer for years and have a hot spot because internet options are very limited in our rural area.  I have stayed with 10G since the beginning.  Most months I don't use the 10G.  Verizon has no problem with me paying for Data I don't use.  This month my daughter comes home from College and she accidentally uses 24G.....14 over get blind sided with $140.00 in overages.  I called Verizon today......stopped in to the store today......My neighbor told me they waved charges for her one time.  Lots of charges.....But I'm am getting no help.  Not even an offer of a payment plan to help me out.  I went back just 6 months and I have over paid for 19G.....Seems like they would like to help out their loyal customers!!!!     Does anybody have any suggestions on how to deal with them?   We are not wealthy....or I would just pay this and walk away......

    There is a big misconception in what customers believe a cell carrier is obligated to do.
    You pay a set price to use up to that amount of xx data. It makes no difference if you use it to the paid limit or way under. Its like peace of mind when you don't have to worry about a data counter.
    Your daughter used the data, your plan is quite clear of what overage charges are. Why should or would Verizon wireless just forgive the charges because you are a customer? Your daughter used the data, get the money from her. That is the responsible thing to do.
    There is no "I have been a loyal customer so please remove the $120, or $250, or $2,000.00 since I did not mean to use it"
    Your electric company, or gas company or any other company does not remove valid charges. Why should Verizon wireless?
    Just pay the invoice and don't think you are being mistreated because Verizon is a business and not a charity.
    Good Luck

  • Creat new files at the beginning of every hour

    I am trying to write a VI to store data in text file. To avoid a too large file, I want to store the data in different files. I want these files to be created at the beginning of every hour. How could I achieve this?
    Thanks in advance!
    Solved!
    Go to Solution.

    Hey,
    Maybe you could integrate this in your code. It will increment the number in the filename every half second.
    Rgds - Rkll
    Attachments:
    File Name Changer.png ‏32 KB
    File Name Changer.png ‏32 KB

  • OBIEE 11.1.1.6.12 - sum of payments starting from the beginning of prompt month

    Hi all,
    how do I calculate sum of payments starting from the beginning of prompt month in OBIEE 11.1.1.6.12 ?

    used firefox no issues but in ie not seeing any issues

  • Repeat_interval In DBMS_SCHEDULER.create_job - for the 2nd of every month

    Hi All,
    I want to specify in the repeat_interval that the scheduler for this job has to be executed on the second of every month at 8 pm .
    I have been racking my brains but nothings coming out.
    Any suggestions??

    You probably want an interval like this:
    FREQ=MONTHLY;BYMONTHDAY=2;BYHOUR=20;BYMINUTE=0;BYSECOND=0;You can use the DBMS_SCHEDULER.EVALUATE_CALENDAR_STRING function to test it, like so:
    SQL > DECLARE
      2  start_date        TIMESTAMP;
      3  return_date_after TIMESTAMP;
      4  next_run_date     TIMESTAMP;
      5  BEGIN
      6  start_date :=
      7    to_timestamp_tz('01-JAN-2003 10:00:00','DD-MON-YYYY HH24:MI:SS');
      8  return_date_after := start_date;
      9  FOR i IN 1..5 LOOP
    10    DBMS_SCHEDULER.EVALUATE_CALENDAR_STRING(
    11      'FREQ=MONTHLY;BYMONTHDAY=2;BYHOUR=20;BYMINUTE=0;BYSECOND=0;',
    12      start_date, return_date_after, next_run_date);
    13  DBMS_OUTPUT.PUT_LINE('next_run_date: ' || next_run_date);
    14  return_date_after := next_run_date;
    15  END LOOP;
    16  END;
    17  /
    next_run_date: 01/02/2003 08:00:00.000000 PM
    next_run_date: 02/02/2003 08:00:00.000000 PM
    next_run_date: 03/02/2003 08:00:00.000000 PM
    next_run_date: 04/02/2003 08:00:00.000000 PM
    next_run_date: 05/02/2003 08:00:00.000000 PM

  • Scheduling Batchjob at the end of every month

    Scheduling Batchjob at the end of every month  
    We have an requirement where in we need to schedule batchjob to excute at the end of every month.
    Could anyone be kind enough to suggest the rite way?
    The workday/time option which will get by clicking on >>,
    does not work.
    Appreciate if anyone can provide your inputs.

    Hi just try in the following manner
    Go to SM36 -->
    job wizard from  the applicataion toolbar-->
    give a job name and set the priority of the job as your requirement (high priority)
    select abap program step and continue
    give the program name and if required then give the variant name and then continue
    pls donot check the check box addtional steps required
    continue
    select radio button date/time
    give the date and time
    select the check box  period
    continue
    set the time monthly/hourly/daily
    then select the continue button
    and press the complete button
    now the job has been scheduled and released ...
    just check
    if the screen has some mandatory option in the selection screen then u have to give some variant
    try and enjoy

  • How do I have a totalizer reset at the end of every month?

    We are using Lookout 5.1 in an application that is receiving a Modbus input giving us a totalizer value.  We need to have this value reset to zero at the end of every month.  Also want the monthly total to be sent to an excell spread sheet.  All help is much appreciated.

    I think this NI Post will help you out....
    Regards

  • History seems to clear at the end of every month using the Safari App

    Hi,
    I use Safari a lot and noticed something a little odd with the History clearing itself automatically at what seems to be the start of every month. I have also noticed Safari on my iMac also does a similar thing but not the same.
    Can anyone help at all on this?
    Many thanks
    Adam

    Don't know about the Mac, but for my phone I have noticed sites I do not visit often disappear from URL history when typing in a URL after a time. Never really tracked it down to how long.

  • [SCORE] How to make an unfinished bar at the beginning of a song?

    I'm working on a song and I'm trying to get the score right.
    The song has an unfinished bar in the beginning; the song is in 4/4 but the very first note starts at the 4th count of the first bar. In the score, Logic automatically puts in a breve rest followed by a quarter rest (interpretation is on), but that's not what I want. At the end of the song, the "missed" notes complement the first bar (so it's in fact a 3/4 bar).
    My problem is that I can't look it up in the manual nor internet, because I don't know the proper English word for it (it's called "opmaat" in Dutch). Online dictionaries aren't helping me either... Sorry for that!
    I can of course set the signature of the 1st bar to 1/4 and make the last 3/4, but then you see the signature change as well in the score.I guess there most be another way to make an "opmaat". Does somebody know this?
    Thanks in advance!
    Message was edited by: Jan Voortwist

    {quote:title=Jan Voortwist wrote:}
    Maybe a stupid question,{quote}
    On the contrary ...!
    how do I dedicate a staff style just to the extra region at the beginning of the song?
    1 - Do you have a region that starts at the very beginning of the Track? Say bar 1?
    2 - Assuming you have a region starting from the very beginning of the song. Cut that existing region at the Right Hand point where you want your 'extra region at the beginning of the song' to end. This should now fit exactly to the rest of the Region on that Track, and when you open the Score Editor there will be a continuous stave of music.
    3 - This now can be treated as a discrete Region in its own right. Open the Score Editor on that Region and change the Staff style by going to Layout>Staff Styles
    4 - Click on New and a menu will open with a list - from that list select Duplicate - this will give you the same Staff Style as that instrument that was already on that Track.
    5 - Double Click the name and Type in your own Name ..say *Piano NEW* - then be sure to TAB out of the box.. Logic 8 does not allow you to change the name if you just click somewhere else. You can then make the changes necessary to that Staff Style as per my example ( ie no Rests)
    6 - You will then find that Piano New appears in the list of Staff Styles for use in any other situation.
    HTH

  • How to get alert box in the middle of scriptlet?

    Hi,
    I got a problem.Please help to resolve that one
    In the following code the alert box is not coming even though the condition is true.
    Can anyone please resolve it
    <%
    Cookie axsCookie;
    axsCookie = new Cookie("user_id", "");
    response.addCookie(axsCookie);
    axsCookie = new Cookie("user_lang_code", "");
    response.addCookie(axsCookie);
    axsCookie = new Cookie("default_lang_code", "");
    response.addCookie(axsCookie);
    String logOut=request.getParameter("logOut");
    if(logOut!=null)
    %>
    <script type="text/javascript">
    var temp='<%=logOut%>';
    if(temp=="true")
    alert('Your password is successfully changed.Please relogin.');
    </script>
    <%
    session.invalidate();
    response.sendRedirect("/priv/logging.jsp");
    %>

    Hi,
    Please use 3 variables of Cookie class.
    <%
    Cookie axsCookie1,axsCookie2,axsCookie3;
    axsCookie1 = new Cookie("user_id", "");
    response.addCookie(axsCookie1);
    axsCookie2 = new Cookie("user_lang_code", "");
    response.addCookie(axsCookie2);
    axsCookie3 = new Cookie("default_lang_code", "");
    response.addCookie(axsCookie3);
    String logOut=request.getParameter("logOut");
    if(logOut!=null)
    %>
    <script type="text/javascript">
    var temp='<%=logOut%>';
    if(temp=="true")
    alert('Your password is successfully changed.Please relogin.');
    </script>
    <%
    session.invalidate();
    response.sendRedirect("/priv/logging.jsp");
    %>

  • Can an image button make an alert box popup?

    So, my first question is: Can a SAVE button that has a button style of IMAGE trigger an alert box to popup?
    If yes, then I have a second question: If I am suppose to use the ONCLICK event, where do I put this code for this type of button? The BUTTON ATTRIBUTES field is greyed out.
    Thank you,
    Maggie

    Maggie:
    You could try the following
    On the 'Edit Button' page
    Set the Target of the button to be URL
    Set the URL Target to be
    javascript:alert('My message');doSubmit('<button name>')varad

  • Building a box from the begining

    I need to build a box (room in house) and attach components like wall hangings. need to rotate the room.
    change the positions of hangings. need to navigate inside the room and view it in different angles
    is it possible to use box object and achive this.
    If i have to create the room from the begining ,from where shall i start .
    Thanks lot ,please reply me ....your ideas are very helpful and appriciate

    Start by reading the usual tutorials - the ones from the sun Java3D page will give you some idea of what you can do with the API.
    If by the "box" object you mean a cube then you could describe rudimentary walls using it, but you will need to do a lot more to create a convincing room (I have done something quite similar, but not using any of the standard Shape3D type objects and using a modelling program to create furnishings in the room.)
    While you're getting started you may also want to look at the handy new dawn software tutorials here: http://www.newdawnsoftware.com/tutorials/tutorials.html as well. If you're serious about it, you will probably want to read the Selman book on Java3D.

  • The Bold, Italic, Underline functions have disappeared from the screen as have the check boxes at the beginning of the intro line

    The bold, italic, underline, color hi-lite and other boxes in that line suddenly disappeared from the screen and that section remains blank. However when writing a new message if I mouse over the area the boxes re-appear but without their previous alliterations. Also the system does not allow me to color hi-lite text and shows all the colors in a very fuzzy format when I mouse over where the hi-lite box used to be. Additionally the check box at the front of the email subject line has also disappeared but, again, if I mouse over & click it will perform a delete or other function. Need help!

    Hi ITBobbyP,
    According to your description, there are two text boxes at the bottom of the tablix and both of them are outside the tablix. When you export the report to excel, the upper text box could not be displayed.
    Microsoft Excel places limitations on exported reports due to the capabilities of Excel and its file formats. The following limitations apply to text boxes and text:
    Text box values that are expressions are not converted to Excel formulas.
    Text boxes are rendered within one Excel cell.
    The text effect "Overline" is not supported in Excel.
    Excel adds a default padding of approximately 3.75 points to the left and right sides of cells. If a text box’s padding settings are less than 3.75 points and is just barely wide enough to accommodate the text, the text may wrap in Excel.
    To troubleshoot the problem, please make sure that the text box meet the limitations. In addition, please validate that visibility of the text box is set to true, it’s better to set CanGrow property of text box to false.
    If the problem remain unresolved, i would appreciate it if you could give us detailed information about the report, I would be appreciated it if you could provide sample data and screenshot of the report. It will help us move more quickly toward a solution.
    Thanks,
    Wendy Fu

  • ICal is showing phantom entries at the beginning of each month

    Back in January, I added two appointments to my iCal "Home" calendar (which I share with my wife's iCal via WebDAV):
    Physical Therapy on January 24 at 5:00 pm
    Physical Therapy on January 31 at 3:30 pm, repeated weekly until February 21
    These 5 appointments are displayed correctly on the January and February month views.
    But beginning in February, iCal goes crazy, showing phantom appointments:
    The January 25 appointment is displayed on the first Sunday in the February view (January 29).
    All 5 appointments are displayed in the first Sunday in the March view (February 25) and the first Sunday of every subsequent month.
    In my wife's iCal, the January 25 appointment is displayed on the rst Sunday in the February view (January 29) and every subsequent month.
    Printing is even worse:
    When I print the March view from my iCal, it shows all 5 appointments on every single day.
    When my wife prints the March view from her iCal, it shows the January 25 appointment on every single day.
    I suspect one fix to this problem would be to simply delete the two appointments on January 24 and 31.  However, I'd like to retain these entries for queries months from now (e.g., "When did I go to physical therapy.").
    -- Ward
    [I'm also submitting this as a formal bug report.]

    Hi,
    Have you tried re-creating the events and deleting the originals?
    Best wishes
    John M

  • TOC at the beginning of every chapter

    Hi,
    I am working on a publication.
    I included a TOC at the beginning of the document:
    Chapter one
    part one
    part two
    Chapter two
    part one
    part two
    Chapter three ...
    So far, so good, but I also want to include the same TOC at the beginning of each chapter,
    this time only containing the part of the TOC that is relevant to that chapter:
    for example: Chapter two should start witch a TOC, containing:
    2.  Chapter two
    part one
    part two
    But it shouldn't contain any of the information about chapter 1 or 3.
    Can this be done?
    At the moment, my publication is just 1 long InDesign document, not an InDesign book or something...
    I accomplish what I want by creating a TOC, and manually delete (for each chapter) the parts that aren't relevant to a specific chapter....
    Any help would be appreciated...

    I would create the TOC as a threaded story.
    The first text frame(s) before the first chapter, second before the second, etc.
    All that you would need to do then would be resize each text frame(s) to fit the correct part of the TOC for that chapter...
    Harbs

Maybe you are looking for

  • Oracle9i Database Release 2 (9.0.2.0.1) Disk 2 Need Help!

    ok i just recently a couple days ago pretty much started downloading the 3 disk set of oracle 9i databse rel. 2 full thing for windows nt/xp etc anyways after 4 re-downloads using my internet explorer browser i finally got on my other pc and download

  • How do I install Lion on new flash drive?

    How do I install Lion on new flash drive?

  • Missing Magnolia Purchase Points

    Hello - I purchased a Sony 4K Ultra HDTV and a Sony 4K media server on December 31, 2013. The Magnolia sales person said the points would appear in a few days, but there is no record of this purchase.  Delivery was on January 2, 2014.  Total cost on

  • OAM protecting ALUI portal

    I am trying to integrate OAM with ALUI portal, I have read the Plumtree integration, and that part I am ok with. Does anyone have any ideas or experience on protecting the actual apps? The issue is the URLs that are used you will have the prefix of /

  • Creating Transient Attributes when query is in Expert Mode

    I wanted to share a recent challenge I encountered. I had created a transient attribute in my View Object and placed it on my .jspx page. When I would navigate to the page I would receive an error telling me, "oracle.jbo.AttributeLoadException: JBO-2