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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can one create a hyperlink wildcard to a document?

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
0
36
US
We have 100's of reports that need to go on our web site for clients to see. the first six digits are the year and a spefic number such as 090287. the rest of the document name is whatever the author decide to type in.
so I am looking at this for example
090287 My County 101509.pdf
090872 Some other County 09042008.pdf
080123 Some other words 01232008.pdf
etc
I have a query that can get the first six digits since thats the project number, but the words after that have no consitancy whatsoever.
The powers to be want a hyperlink to open the .pdf report .
so if I create a hyperlink can it just use the first six digits and get the docuemt somehow? the first six digits are always unique.
it would take a very long time to get all the individual names and create hyper links. I want to use MS Access to create a query and fill in hyperlink.

hope this makes any sense at all????

DougP
[r2d2] < I Built one
 
here is an example of a hyperlink and full document name
analytereports/090336IH the Main Plant 102309.pdf
I need something like
analytereports/090336IH*.pdf

DougP
[r2d2] < I Built one
 
I don't think that wid cards are possible.

If you are just looking to create a big list of hyperlinks, load them into a single directory and use a server side language (Perl, PHP etc.) to create a long list, from the file names.
You could even set them in an order if the initial numbers are dates.

Keith
 
are you using a server side scripting language?

If so, you could compare the first six digits to the files on the server. If any match, get the full file name and dynamically generate the hyperlink.

--------
GOOGLE is a great resource to find answers to questions like "how do i..."

If you don't know exaclty what you want to do or what to search on, try Google Suggest: --------
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javasc
 
No wildcards in HTML. What you can do is with some type of server side language use the ID number provided by the DB, and search for the document which contains that number. Then dynamically generate the hyperlink based on that.

For specifics on how to do this, try the forum for the server side language that your server supports.

forum434
forum333
forum855
forum232




----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Just to throw another option into the mix that involves no server-side scripting at all (one which I use now and again), if they're all in one folder, or subfolder of one folder, you could drop into DOS at the top-level folder, and type:

Code:
dir *.pdf /on /b /s > pdflist.txt

Which would produce something like this in a file called pdflist.txt:

Code:
C:\Somefolder\123456 A file.pdf
C:\Somefolder\234567 Another file.pdf
C:\Somefolder\sub 1\987654 Yet another file.pdf

Then, using Textpad (or any good text editor with RegEx search and replace support), you should be able to insert the relevant markup and even (if your regex is good enough) use the filename as the link text.

How's that for a different solution ;-)

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top