|
Posted by Glenn Mulno on March 25, 2005, 1:43 pm
Please log in for more thread options
Off the wall question:
Is there a way to set a hyperlink so that it opens the newest file in a
directory?
Why: I have a page that is a link to a daily set of reports. A new report
gets output every single night with a new unique name like this:
applicationperformance032520050100.doc
Which is the Application performance report for March 25 2005 out put at
1:00 AM. Tomorrow, a newer report will be there titled:
applicationperformance032620050100.doc
I want to provide a link the "Yesterdays Report" without needing to go in
and edit the link every morning.
Any suggestions?
Thanks
--
Glenn
|
|
Posted by kaeli on March 25, 2005, 1:55 pm
Please log in for more thread options
enlightened us with...
show/hide quoted text
>
> Any suggestions?
Perl, PHP, JSP, Cold Fusion, ASP...
Javascript if you're REALLY stuck for a server-side solution. A bit easier to
do server-side, IMO, but it could be done client-side, assuming the browser
supported it (most do).
Added advantage to server-side: it can tell you if the file is missing. JS
will only write the link.
--
--
~kaeli~
Any sufficiently advanced technology is indistinguishable
from magic.
http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace
|
|
Posted by Stan Brown on March 25, 2005, 10:59 pm
Please log in for more thread options
"Glenn Mulno" wrote in comp.infosystems.www.authoring.html:
show/hide quoted text
>Is there a way to set a hyperlink so that it opens the newest file in a
>directory?
Yes, certainly. Remember that href="..." doesn't necessarily
identify a particular static file, or even a file at all. It's
interpreted by the server. Use some special URL and set up the
server to recognize it as a command to find and serve up the newest
file in the directory. Sounds like a job for CGI or similar.
If you're asking can you do it client side, the answer is No: the
client doesn't have the necessary information.
--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
|
|
Posted by Blinky the Shark on March 26, 2005, 6:02 am
Please log in for more thread options
Glenn Mulno wrote:
show/hide quoted text
> Off the wall question:
show/hide quoted text
> Is there a way to set a hyperlink so that it opens the newest file in a
> directory?
show/hide quoted text
> Why: I have a page that is a link to a daily set of reports. A new report
> gets output every single night with a new unique name like this:
> applicationperformance032520050100.doc
show/hide quoted text
> Which is the Application performance report for March 25 2005 out put at
> 1:00 AM. Tomorrow, a newer report will be there titled:
> applicationperformance032620050100.doc
Why not generate applicationperformancecurrent, and have a script
rename it with the appropriate date when the next
applicationperformancecurrent is generated, 24 hours later? Might not
this be more logically handled at the file system level than at the web
access level? Sure, this is an HTML newsgroup (even though this is a
scripting question) -- but that doesn't mean that a more basic approach
isn't indicated.
--
Blinky Linux Registered User 297263
Who has implemented Usenet Solution #45933:
Now killing all posts originating at Google Groups
|
| Similar Threads | Posted | | Link that opens IE | January 23, 2007, 8:21 pm |
| css file won't link to xhtml | April 20, 2005, 10:15 pm |
| Link inside the ZIP file ? | December 24, 2006, 4:07 am |
| Old Website Opens in New Website's Main Frame | November 2, 2006, 10:00 am |
| Call for Papers Opens for ApacheCon US 2008 | March 1, 2008, 3:04 pm |
| Forcing retrieval of a fresh copy of a file with a link | May 30, 2008, 8:47 am |
| Target frame link anchor in new parent html file | December 13, 2004, 3:47 am |
| Link to a frames based page links to wrong html file. | June 14, 2006, 6:53 pm |
| Registration opens for XML 2005; Respected XML Forum Delivers Practical Information That Attendees Can Put to Immediate Use within Their Organizations | July 21, 2005, 12:33 pm |
| multiple instances of a CSS link due to server-side file inclusion and tools requirements | November 18, 2008, 12:03 am |
|
> Any suggestions?