Ask a Question related to Macromedia Dreamweaver, Design and Development.
-
R3iam webforumsuser@macromedia.com #1
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
-
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. ... -
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 >... -
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... -
Convert date/time to date in SQL Server 2000 statement
Can this be done? tia -
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. ... -
Dagwood Bumstead #2
Re: Current Date & Time
"R3iam" [email]webforumsuser@macromedia.com[/email] wrote:
Easy, since your host supports perl/cgi, just insert this in the page you want> 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.
>
the time to echo on:
<!--#echo var="DATE_LOCAL" -->
Dagwood Bumstead Guest
-
oliverkelso webforumsuser@macromedia.com #3
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'> : </font>"+minutes+" "+"<sup style='font-size:1px'>"+dn+"</sup>"
else
clockobj.innerHTML=hours+"<font color='black'> : </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
-
R3iam webforumsuser@macromedia.com #4
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
-
Dagwood Bumstead #5
Re: Current Date & Time
"R3iam" [email]webforumsuser@macromedia.com[/email] wrote:
The syntax I gave you didn't work? Did you check the server log for the reason?> 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
Are you sure that you have the ability to run scripts on the server-side?
Dagwood Bumstead Guest



Reply With Quote

