User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 427,360 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,042 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 3206 | Replies: 5
Reply
Join Date: Sep 2004
Posts: 3
Reputation: rpainter is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rpainter rpainter is offline Offline
Newbie Poster

Help Please Help With Hyperlinks

  #1  
Sep 10th, 2004
Hello. I am new to this forum. I am not a web developer, but I am willing to learn. I am a network tech. So here is what I need to do: I need to be able to list and sort by date some files in a folder on another page. I also need the file names to be hyperlinked to the actual file so that the people can download the file.

Our emergency preparedness director will release press releases and put them in a folder. I need this page to update every time he puts something new in. I already found some code that will do everything that I need to do, except put the hyperlink back to the file. The code that I found can be seen here: http://www.aspfaqs.com/ASPScripts/Pr....asp?FAQID=118. I have also attached the code in a txt file to this message.

If anyone can tell me what I need to do to get hyperlinks to work, I would appreciate it. Thank you.

Rusty Painter
rpainter@dorchestercounty.net
Attached Files
File Type: txt code.txt (5.3 KB, 1 views)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2004
Location: UK
Posts: 9
Reputation: InstantASP Ltd is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
InstantASP Ltd's Avatar
InstantASP Ltd InstantASP Ltd is offline Offline
Newbie Poster

Re: Please Help With Hyperlinks

  #2  
Sep 10th, 2004
Could you not just modify...

fname = fileItem.Name

To read

fname = "<a href=http://downloads.com/myfiles/>" & fileItem.Name & "</a>

This won't work if you have sub directories
Kindest Regards,

Ryan Healey
InstantASP Ltd
ASP.NET Collaboration and Support Tools

http://support.instantasp.co.uk/imag...ntasp_logo.gif
Reply With Quote  
Join Date: Sep 2004
Location: UK
Posts: 9
Reputation: InstantASP Ltd is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
InstantASP Ltd's Avatar
InstantASP Ltd InstantASP Ltd is offline Offline
Newbie Poster

Re: Please Help With Hyperlinks

  #3  
Sep 10th, 2004
Sorry Correction...

fname = "<a href=http://downloads.com/myfiles/" & fileItem.Name & ">" & fileItem.Name & "</a>
Kindest Regards,

Ryan Healey
InstantASP Ltd
ASP.NET Collaboration and Support Tools

http://support.instantasp.co.uk/imag...ntasp_logo.gif
Reply With Quote  
Join Date: Sep 2004
Posts: 3
Reputation: rpainter is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rpainter rpainter is offline Offline
Newbie Poster

Re: Please Help With Hyperlinks

  #4  
Sep 10th, 2004
Here's the error that I get when I try that.

Error Type:
Microsoft VBScript compilation (0x800A0409)
Unterminated string constant
/test.asp, line 58, column 97
fname = fname = "<a href=http://localhost/myfiles/" & fileItem.Name & ">" & fileItem.Name & "</a>

My folder is in the root of the web. Any sugestions?
Reply With Quote  
Join Date: Sep 2004
Posts: 3
Reputation: rpainter is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rpainter rpainter is offline Offline
Newbie Poster

Re: Please Help With Hyperlinks

  #5  
Sep 10th, 2004
I noticed that I had fname = in twice. I took one out. The only thing that that change is now the error is on column 89.
Reply With Quote  
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 166
Reputation: Lafinboy is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 7
Lafinboy's Avatar
Lafinboy Lafinboy is offline Offline
Junior Poster

Re: Please Help With Hyperlinks

  #6  
Sep 18th, 2004
You're missing a closing quote mark at the end of the string. Try:
fname = fname = "<a href=http://localhost/myfiles/" & fileItem.Name & ">" & fileItem.Name & "</a>"
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.

Lafinboy Productions
:: Website Design :: Website Development ::

Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP Forum

All times are GMT -4. The time now is 3:33 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC