|
| |
|
|
yogaboy
Posts: 377 Joined: 5/22/2004 Status: offline
|
Don't Quote me! - 11/15/2004 15:08:35
I have a link to a document made from info the user gave in a form. The link doesn't work when people use single quotes in the form. I've got this... mySQL = "SELECT DocTitle, FileName FROM KeyDocs" myFileName = myRS("FileName") myFileName = Replace(myFileName, "'", "''") Response.write "<TR><TD><P><a href='/documents/" & myFileName & "'>" & myRS("DocTitle") & "</A>" But using the Filename Children'sNSF09MentalHealth.pdf just gives a link of /documents/Children What am I missing? I've checked the values using Response.writes and tried using both for the link myRS("Filename") = Children'sNSF09MentalHealth.pdf and myFileName = Children''sNSF09MentalHealth.pdf
|
|
|
|
BeTheBall
Posts: 6502 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Don't Quote me! - 11/15/2004 18:31:08
What happens if you replace: " & myFileName & " with " & Server.URLEncode(myFileName) & "
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
BeTheBall
Posts: 6502 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Don't Quote me! - 11/17/2004 8:26:27
What if you put your URL into a variable and then call it later something like: mySQL = "SELECT DocTitle, FileName FROM KeyDocs" myFileName = myRS("FileName") myURL = Server.URLEncode("/documents/" & myFileName) Response.write "<TR><TD><P><a href='"&myURL&"'>" & myRS("DocTitle") & "</A>"
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|