Solved

adding date and time to a webpage?

Posted on 2009-04-10
8
199 Views
Last Modified: 2013-11-19
How can I do this without using javascript? just basic html?
0
Comment
Question by:TeknikDev
  • 4
  • 2
  • 2
8 Comments
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24117481
What server language are you using? asp?

A.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24117551
You don't need a server-side script for this if you are on Apache.  A simple SSI will work too.
0
 

Author Comment

by:TeknikDev
ID: 24117553
Html ...no server
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24117570
TeknikDev,

At minimum, you need a server.  Plain old HTML previewed locally has no method to get a date or time.  Javascript is the only option at this point.

If you are running Apache, you can enable server-side includes and use that in plain HTML (no PHP or ASP needed).
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:TeknikDev
ID: 24117593
What's apache? How would i know what server im using? i am hosting the site at ixwebhosting.com.
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 24117639
Anytime your ISP advertises PHP, MySQL with hosting, they are running Apache.  So you can use SSI.

Instructions to test (and the date command) are here:

http://www.webmasterworld.com/forum13/546.htm

Basically, put the following code in your page to test:

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

If that doesn't return the date, you will need to add some commands in an .htaccess file per the link above.
0
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24117661
The server is likely to be either Linux or Windows.

Try and find out which one it is.

A.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24117686
ixwebhosting.com is a shared *nix environment.  I'm familiar with them...
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now