Solved

adding date and time to a webpage?

Posted on 2009-04-10
8
203 Views
Last Modified: 2013-11-19
How can I do this without using javascript? just basic html?
0
Comment
Question by:TeknikDev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

739 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