Solved

System date in a Hyperlink

Posted on 1998-11-19
4
152 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses how to create an extensible mechanism for linked drop downs.
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 Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

912 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