Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get the value of hyperlink

Status
Not open for further replies.

cecilcheah

Programmer
Apr 30, 2001
28
CH
Hi all:

I have an ASP page with hyperlink values fetched from a database to open PDF file located in an Intranet. However, i would like to show the PDF file embedded in an HTML page, so i would like to open this html page from the existing ASP page. However, the database only have the name and location of the pdf file. So, in a perfect world, i would like to send this PDF name and location from the first asp page to another ASP page which contains the embedded pdf object. The second ASP page will accept the value from the first asp page so it will know where and what the pdf file
is.
So the question is, how do i do that. Since i will not be able to know in the first ASP page what the user will click.

Thanks

Cecil
 
I would probably use javascript

<a href=&quot;&quot; onClick=&quot;javascript:document.location='/location/<%=filename from db%>'&quot;>

Steve Davis
hey.you@hahaha.com.au
 
Hi Steve:

You mean, in the first ASP page, i should use Javascript to open the second ASP page, and the onClick should go into the database?

I will try it. Never think of using Javascript


Thanks

Cecil
 
When the person clicks, hopefully you know the name of the .PDF file they are going to view. If so, just toss the filename into the document.location call. Steve Davis
hey.you@hahaha.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top