|
-
September 30th, 2002, 01:58 PM
#1
VBScript <A href=file output error
Hi,
Here's what I'm trying to do.
wohno is a variable assigned for a work order number.
strSQL= strSQL & " '<A href=file:' + 'P:\' + wohno + '.pdf' + '>' + wohno + '</A>' "
When i go to click on this it doesn't take the whole file path and I'm pretty sure it's because the file and path aren't in double quotes. I just can't figure out how to put them in so that it works.
any help would be much appreciated
Dione
-
September 30th, 2002, 02:25 PM
#2
strSQL ='<A href=file:' + 'P:/' + wohno + '.pdf' + '>' + wohno + '</A>'
try turning backslashes into forward slashes and see if that works.
-
September 30th, 2002, 02:44 PM
#3
So apparently I'm having a moment. It does display the workorder number, what it doesn't display is the .pdf at the end. Am I doing it correctly. I want this to create a pdf file that I can open later.
I'm not sure if it's the correct way to do it.
Dione
-
September 30th, 2002, 02:59 PM
#4
To play it safe you should change it to this:
strSQL = strSQL & " '<a href=\"file:///P:/' + wohno + '.pdf\">' + wohno + '</a>' "
Note that the href is surrounded in quotes to be XHTML compliant and to be safe in case a file name or directory contains spaces. Also the file protocol specifier should be followed by 3 forward slashes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|