Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 22nd, 2004, 01:21 PM
Registered User
 
Join Date: Nov 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Click on link to open file from .asp

First of all, excuse me if I sound like a fool, I am just getting started at this.

I have an .asp page which is displays a list of the contents of a windows folder. My goal is to be able to click on file name and open it up for viewing, like any other href link.

the code is currently

<tr>
<td class="TableHeader">Client Files</td>
</tr>

<%
If ClientFolderExists Then
%>
<tr>
<td class="Label">Folder: <a href="<%=ClientFolders & ClientFolder%>"> <%=ClientFolder%></a></td>
</tr>
<%
End If
%>
<tr>
<td>
<iframe height=300 frameborder=no src="ClientFiles.asp?FolderName=<%=Server.URLEncod e(ClientFolders & ClientFolder)%>"></iframe>
</td>
</tr>

As the code is now, I can right click on the link, copy the link and paste it into a browser and it will open up the file. However, I want simply to be able to click on the link to open up the file.

here is a sample link which the code creates

file:///c:/inetpub/wwwroot/matis/ClientFolders/Druse,%20III,%20Frank-126/ticket%20and%20agreement.tif

 
Old November 22nd, 2004, 02:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,
Quote:
quote:As the code is now, I can right click on the link, copy the link and paste it into a browser and it will open up the file. However, I want simply to be able to click on the link to open up the file.
Right now what do you see on the browser when you browse this page and how does that behave when you simple do a left click?

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old November 22nd, 2004, 03:02 PM
Registered User
 
Join Date: Nov 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When I hover over the link, the cursor turns to a hand and I see the link displayed in the lower left corner of IE, across the bottom.

A simple left click does nothing.

I believe that the code is correctly creating the link, because I can copy and paste into a browser and it works.

 
Old November 22nd, 2004, 03:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Not sure what you are missing. But copy/paste of link into browser is similar to clicking the link and that should work if the link is created correctly, as you say.

_________________________
- Vijay G
Strive for Perfection
 
Old November 22nd, 2004, 04:18 PM
Registered User
 
Join Date: Nov 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I guess we are stuck.

By the way, when I cut and paste the page into Front Page, the links work fine






Similar Threads
Thread Thread Starter Forum Replies Last Post
Link button click event sarah lee ASP.NET 2.0 Basics 5 May 18th, 2007 09:29 AM
double click to open link thutt Dreamweaver (all versions) 0 February 8th, 2007 05:01 PM
How to open .DOC in MS-Word file thru a link ? sherbir Javascript 10 March 8th, 2006 06:20 AM
Click on link in VB6 Perseus Beginning VB 6 1 August 30th, 2005 05:52 PM
How to open .DOC file with MS-Word thru a link ? sherbir Servlets 0 August 3rd, 2004 07:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.