Ask a Question related to Macromedia Dreamweaver, Design and Development.

  1. #1

    Default Current Date & Time

    I want to display the current date & time on my web site. Not being a code guru could someone please tell me what is the simplest script that works well with dreamweave mx. I think my web host only supports cgi and perl scripts (earthlink). I used an extension but it didn't work.

    R3iam


    R3iam webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Get current date/time? Use them in hidden field?
      I've got an app that works as a reception log for clients coming in our agency. The receptionist logs each client's name into our log database. ...
    2. CFMX7.0.1 Administrator date time issue showing 13hrsbehind server time
      I am running a W2k SP4 box that has been upgraded from CFMX6 to CFMX7.0.1. The CFMX7.0.1 server is showing the date on the Server Settings >...
    3. Saving current date and time in ASP and ACCESS
      Hi all, Im developing a simple web page and Im new to ASP. I want to save the current date and time in my MS ACCESS table I have a field in...
    4. How to change the current thread current culture at run time.
      I have created a new culture : Dim objCulture As New CultureInfo("he") //hebrew When I tried to assign it to the current thread. ...
  3. #2

    Default Re: Current Date & Time

    "R3iam" [email]webforumsuser@macromedia.com[/email] wrote:
    > I want to display the current date & time on my web site. Not being a code
    > guru could someone please tell me what is the simplest script that works well
    > with dreamweave mx. I think my web host only supports cgi and perl scripts
    > (earthlink). I used an extension but it didn't work.
    >
    Easy, since your host supports perl/cgi, just insert this in the page you want
    the time to echo on:

    <!--#echo var="DATE_LOCAL" -->

    Dagwood Bumstead Guest

  4. #3

    Default Re: Current Date & Time

    you can just use Java Script for those if you want. It get the date and time from the users machine and displays it on the site where you stick the script. The only problem with this is it won't be accurate if there machine's date and time are not accurate. It is basically just showing what their PC is already saying.

    Here is the one for post a Date, just copy and past this script bellow into a table in the spot you want it. ----


    <SCRIPT LANGUAGE="Javascript"><!--

    // ***********************************************
    // AUTHOR: [url]WWW.CGISCRIPT.NET[/url], LLC
    // URL: [url]http://www.cgiscript.net[/url]
    // Use the script, just leave this message intact.
    // Download your FREE CGI/Perl Scripts today!
    // ( [url]http://www.cgiscript.net/scripts.htm[/url] )
    // ***********************************************

    // Get today's current date.
    var now = new Date();

    // Array list of days.
    var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thu rsday','Friday','Saturday');

    // Array list of months.
    var months = new Array('January','February','March','April','May',' June','July','August','September','October','Novem ber','December');

    // Calculate the number of the current day in the week.
    var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

    // Calculate four digit year.
    function fourdigits(number) {
    return (number < 1000) ? number + 1900 : number;
    }

    // Join it all together
    today = days[now.getDay()] + ", " +
    months[now.getMonth()] + " " +
    date + ", " +
    (fourdigits(now.getYear())) ;

    // Print out the data.
    document.write(" " +today+ ".");

    //--></SCRIPT>



    Now here is the script for time:

    //PAST THIS INTO THE HEAD

    <style>
    <!--
    ..styling{
    background-color:black;
    color:lime;
    font: bold 16px MS Sans Serif;
    padding: 3px;
    }
    -->
    </style>




    //PASTE THIS INTO THE BODY FOR THE CLOCK

    <span id="digitalclock" class="styling"></span>

    <script>
    <!--

    //LCD Clock script- by javascriptkit.com
    //Visit JavaScript Kit ([url]http://javascriptkit.com[/url]) for script
    //Credit must stay intact for use

    var alternate=0
    var standardbrowser=!document.all&&!document.getElemen tById

    if (standardbrowser)
    document.write('<form name="tick"><input type="text" name="tock" size="11"></form>')

    function show(){
    if (!standardbrowser)
    var clockobj=document.getElementById? document.getElementById("digitalclock") : document.all.digitalclock
    var Digital=new Date()
    var hours=Digital.getHours()
    var minutes=Digital.getMinutes()
    var dn="AM"

    if (hours==12) dn="PM"
    if (hours>12){
    dn="PM"
    hours=hours-12
    }
    if (hours==0) hours=12
    if (hours.toString().length==1)
    hours="0"+hours
    if (minutes<=9)
    minutes="0"+minutes

    if (standardbrowser){
    if (alternate==0)
    document.tick.tock.value=hours+" : "+minutes+" "+dn
    else
    document.tick.tock.value=hours+" "+minutes+" "+dn
    }
    else{
    if (alternate==0)
    clockobj.innerHTML=hours+"<font color='lime'>&nbsp;:&nbsp;</font>"+minutes+" "+"<sup style='font-size:1px'>"+dn+"</sup>"
    else
    clockobj.innerHTML=hours+"<font color='black'>&nbsp;:&nbsp;</font>"+minutes+" "+"<sup style='font-size:1px'>"+dn+"</sup>"
    }
    alternate=(alternate==0)? 1 : 0
    setTimeout("show()",1000)
    }
    window.onload=show

    //-->
    </script>

    at the top of this script you can tweek it for a different back ground color and font color and other things.

    I hope this all helped. Go and run a search on freeware java scripts, there is some pretty cool stuff out there.

    I don't suffer from insanity.......I enjoy every minute of it!
    oliverkelso webforumsuser@macromedia.com Guest

  5. #4

    Default Re: Current Date & Time

    I haven't had the luck of making this work. However, I will continue my search for a script that will work for me. Thanks to all who replied. As for darrell's question of why would anyone want to display time and date is simple.... It looks good. Everything is not suppose to be logical and functional, sometimes things just look good. My wife is a perfect example. Thanks again.

    R3iam


    R3iam webforumsuser@macromedia.com Guest

  6. #5

    Default Re: Current Date & Time

    "R3iam" [email]webforumsuser@macromedia.com[/email] wrote:
    > I haven't had the luck of making this work. However, I will continue my
    > search for a script that will work for me. Thanks to all who replied. As for
    > darrell's question of why would anyone want to display time and date is
    > simple.... It looks good. Everything is not suppose to be logical and
    > functional, sometimes things just look good. My wife is a perfect example.
    > Thanks again.
    >
    > R3iam
    The syntax I gave you didn't work? Did you check the server log for the reason?
    Are you sure that you have the ability to run scripts on the server-side?

    Dagwood Bumstead Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139