Solved

adding date and time to a webpage?

Posted on 2009-04-10
8
202 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
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 
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
 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
manage footer size 4 73
how to build a intranet site 8 42
"Go Fund Me" type plugin 5 25
Query still returning duplicates 5 41
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
The viewer will learn how to dynamically set the form action using jQuery.
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.

821 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