Link to home
Start Free TrialLog in
Avatar of johnsm
johnsm

asked on

How do I display the date on my index page?

I am using NT4 with IIS3. I have ASP and Perl 5.003 loaded. Is there any way I can get the date from some sort of environment variable and display it on my index page.

I know how to get it from a perl script, but the script needs some sort of action to run. It won't display anything unless it is executed by some trigger, so it won't work on my index page.

I simply want to say "Todays date is...whatever" on my home page.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Eck
Eck

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sybe
sybe

The only thing is that is needs an ASP to be your index page. It is possible to do that, but you need your webroot to be "executable" (and all your subdirectories will automatically be executable too).

The easiest thing is probably client-side javascript, it will display the date of the client, not of the server:

<script>
Now = new Date();
document.write(Now):
</script>

===

You could also try to use SSI (Server Side Include) but I am afraid that IIS3 does not support the SSI exec command. Anyway, to use SSI you'll have to rename your index file too.




Avatar of johnsm

ASKER

Thanks,