Results 1 to 8 of 8

Thread: looking for a javascript ajax to handel 366 days

  1. #1
    Join Date
    Dec 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default looking for a javascript ajax to handel 366 days

    I have a website where I display a devotional each day of the year. I make a html file for each day of every month, and daily copy & paste the right day to my index.html file. I'm looking for a javascript ajax that can load a different file every day of the year, 366 days, not 31 days.

    Is it possible to use your script title "Daily Iframe Content II" and expand 'daycontent [31] until daycontent [366]?

    And can I change the name of the file to be load, instead of "1.html" so something more meaningful to me like the date of the year, because I won't be able to know which day is "249.html". The way that I name is something like this: "05-23-2013-i_need_god's_grace.html" It is long, but I need a way to handle 366 different files every single year, and I have 5 years doing it the hard way. It 's time due to learn javascript and ajax!!!

    Please, if anyone of you can help me, will be appreciated.

    Molina Ossers.

  2. #2
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    297
    Thanks
    5
    Thanked 18 Times in 18 Posts

    Default

    So are you looking for something to load an html file for 366 days eg: Jan 1 = day 1, Jan 10 = day 10, etc...
    Or do you want it to do something like this:
    jan 1 = 01/01?
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  3. #3
    Join Date
    Dec 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I would prefer
    day 1 = Jan 1
    day 2 = Jan 2
    day 3 = Jan 3

    But this present the problem of the leap year! I think.

    What about:

    day 1 = 'a_real_title' base on the content of the devotional?

    The real matter is that I'm looking for something that can load a file to my index.html in an iframe or without an iframe. I prefer without iframe.

    This is the website I'm talking about: http://www.upavision.com/English/Englishindex.html

  4. #4
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    297
    Thanks
    5
    Thanked 18 Times in 18 Posts

    Default

    there would be a much more easy way to do this you know that right?
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    Crazykld69, your post is borderline flaming and not helpful. If there is a better option, please suggest it or if not don't complain about it.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Dec 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks djr33, your respond brought my trust in this forum for help back. I'm just asking for help.

  7. #7
    Join Date
    Dec 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm still looking for a JS or something else to upload the devotional. Any idea?

  8. #8
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,774
    Thanks
    2
    Thanked 410 Times in 405 Posts

    Default

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
      <title></title>
    </head>
    
    <body>
    <script type="text/javascript">
    /*<![CDATA[*/
    function Days(){
     var n=new Date(),y=n.getFullYear(),m=n.getMonth(),days=n.getDate(),z0=0;
     for (;z0<m;z0++){
      days+=new Date(y,z0+1,1,-1).getDate();
     }
     return (days<10?'00':days<100?'0':'')+days;
    }
    
    alert(Days()+'.htm');
    
    /*]]>*/
    </script>
    </body>
    
    </html>
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

Similar Threads

  1. Tip of the day for 365 days
    By romeshlogan in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 09-03-2013, 11:12 AM
  2. Javascript after ajax request in ajax tabs
    By cheeko in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 07-09-2009, 02:37 AM
  3. Javascript.AJAX link inside javascript dropdownmenu
    By Possemaster in forum JavaScript
    Replies: 2
    Last Post: 01-25-2008, 08:46 AM
  4. Add Days to a date
    By fastrobby in forum JavaScript
    Replies: 0
    Last Post: 07-10-2007, 10:33 PM
  5. The good old days
    By Jack in forum The lounge
    Replies: 3
    Last Post: 11-17-2006, 04:58 AM

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
  •