Solved

System date in a Hyperlink

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

803 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