Solved

System date in a Hyperlink

Posted on 1998-11-19
4
150 Views
Last Modified: 2010-04-09
How can I include the system date in a hyperlink? When the link is pressed each day, the data in it, is the same as the system date. The system date info, is processed when the link is pressed, in order to pointed to the page I want.
0
Comment
Question by:flmartins
  • 2
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 100 total points
ID: 1839915
ASP:

<a href="<%=Date()%>.htm">

SSI

<a href="<!--#echo var="DATE_GMT" -->.htm">


Javascript:

<script>
now = new Date();
strDate = getYear(Now) + "-" + getMonth(Now) + "-" + getDate(Now);
document.write('<a href="' + strDate + '.htm">linktext</a>'>
</script>

0
 

Author Comment

by:flmartins
ID: 1839916
For example:
http://www.internet.net/(syatem date).htm

How would I write the hyperlink?
0
 
LVL 28

Expert Comment

by:sybe
ID: 1839917
I gave you 3 possible ways to do it. It depends on you which one you prefer/are able to use.

SSI and ASP are serverside solutions, and will display the date of the server. The javascript solution will display the date of the client machine.

If you are able to use SSI, I would recommend that, it's the easiest.

<a href="http://www.internet.net/<!--#echo var="DATE_GMT" -->.htm">


0
 

Author Comment

by:flmartins
ID: 1839918
My problem remains: The link is this one:
http://homesite/OB2-cgi/omninotify.pl?submit=session&session
=1998/11/19-29&server=lxhp08

And I wanna include the variable in this date 1998/11/19
0

Featured Post

Free Trending Threat Insights Every Day

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

706 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

19 Experts available now in Live!

Get 1:1 Help Now