Javascript that shows the date and the link

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • justsexxx
    Too lazy to set a custom title
    • Aug 2001
    • 13723

    #1

    Javascript that shows the date and the link

    Hi,

    I have found some javscripts that shows the date.

    But what I want is the following:

    The date must not only be showed, but must also be the link. I can't get this done

    further, I would like to have the code for yesterday as well.

    so i t will ook like this

    19june
    19june
    18june
    18june etc and when you load it tomorrow, you will see

    20 june
    20june
    19 june
    19june

    Anyone knows how to make that?

    Andre
    Questions?

    ICQ: 125184542
  • hyper
    Confirmed User
    • Mar 2002
    • 5294

    #2
    for your tgp? just call the date in the script rather than the url

    Comment

    • justsexxx
      Too lazy to set a custom title
      • Aug 2001
      • 13723

      #3
      Well I would like to be that the date is the link
      (it's for a CJ)
      Andre
      Questions?

      ICQ: 125184542

      Comment

      • funkmaster
        So Fucking Banned
        • Sep 2001
        • 7938

        #4
        http://javascript.internet.com/calendars/

        Comment

        • hyper
          Confirmed User
          • Mar 2002
          • 5294

          #5
          well when you layout your script you usually output the url with a string like this<.a href="%url%"> %desc% </a> for the description what you need to do is change it to something like %date% I dont know what script your using so i can not tell you the exact data string to use..

          hope this helps you somewhat
          Last edited by hyper; 06-19-2002, 12:16 PM.

          Comment

          • grumpy
            Too lazy to set a custom title
            • Jan 2002
            • 9870

            #6
            PHP Code:
            <SCRIPT LANGUAGE="JavaScript">
            <!-- Begin
            var month="";
            var myweekday="";
            var year="";
            mydate = new Date();
            mymonth = mydate.getMonth();
            myweekday= mydate.getDate();
            weekday= myweekday;
            myyear= mydate.getYear();
            year = myyear
            if(mymonth == 0) {
            month = "JANUARI "}
            else if(mymonth ==1)
            month = "FEBRUARI "
            else if(mymonth ==2)
            month = "MAART "
            else if(mymonth ==3)
            month = "APRIL "
            else if(mymonth ==4)
            month = "MEI "
            else if(mymonth ==5)
            month = "JUNI "
            else if(mymonth ==6)
            month = "JULI "
            else if(mymonth ==7)
            month = "AUGUSTUS "
            else if(mymonth ==8)
            month = "SEPTEMBER "
            else if(mymonth ==9)
            month = "OKTOBER "
            else if(mymonth ==10)
            month = "NOVEMBER "
            else if(mymonth ==11)
            month = "DECEMBER "
            // End -->
            </SCRIPT> 
            

            // then somewhere on the page
            PHP Code:
            document.write("<td><img src='pics//s_"+((10*myweekday)) +".jpg'><//td>"); 
            
            Last edited by grumpy; 06-19-2002, 12:58 PM.
            Don't let greediness blur your vision | You gotta let some shit slide
            icq - 441-456-888

            Comment

            • justsexxx
              Too lazy to set a custom title
              • Aug 2001
              • 13723

              #7
              Well I don't use a "script"

              It's only a CJ, so the only output what I have are some banners, and the rest all dates in tables

              Andre( or did I understand you wrong)
              Questions?

              ICQ: 125184542

              Comment

              • justsexxx
                Too lazy to set a custom title
                • Aug 2001
                • 13723

                #8
                Grumpy can you pls put the code in

                [code ]
                [/ code] ?

                Thnx a lot! great thnx I will try it

                Andre
                Last edited by justsexxx; 06-19-2002, 12:57 PM.
                Questions?

                ICQ: 125184542

                Comment

                Working...