stmasi
06-23-2003, 11:35 AM
Is there any way to display the date / time / etc. without the use of JavaScript or Server-Side?
Thanx.
Thanx.
|
Click to See Complete Forum and Search --> : Date / Time Display... stmasi 06-23-2003, 11:35 AM Is there any way to display the date / time / etc. without the use of JavaScript or Server-Side? Thanx. Jonathan 06-23-2003, 11:52 AM I don't think so, but I know a really simple souce code for this... Save this text as a .js file. <!--Start Date Script test = new Date() month =test.getMonth() month = (month * 1) + 1 day = test.getDate() year = test.getYear() document.write(" ",month,"/",day,"/",year," ") //End Date Script--> Then, put this where you want the clock to appear: <script src="datestmp.js"></script> BUT! Make sure you change the datestmp.js to what you saved the beginning text as... For example... I saved the .js file as datestmp.js In the script where I wanted the clock to appear I have <script src="datestmp.js">. Hope this helps.. stmasi 06-23-2003, 12:20 PM Darn. Just wanted to see if there was a way in order to account for the 10% or so who don't / can't utilize javascript. Thanx. pyro 06-23-2003, 01:03 PM Yes, there is a way to account for them, but that way is server side. Here's PHP... <?PHP echo date("m/d/Y"); #MM/DD/YYYY ?> webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |