S
sklett
Hi
I have code that writes links, these links call a javascript function and
pass in a url.
So let;s say I have a client side function like this
function DoIt( url )
{
alert(url);
}
Then, in my server script I have
Response.Write("<br>")
response.write( "<a href='javascriptoIt(" )
response.write( "'Detail.asp?Doc=" )
response.write( Docs(i) )
response.write( "')" )
response.write( "'>" )
response.write( PullNameFromPath(Docs(i)) )
response.write( "</a>"&vbcrlf )
Where Docs(i) is an array of links
The problem is, I need to send the url to the javascript function as a
string, but I can't figure out how to wrap it in ' ' characters without
terminating the <a> tag. For example, this won't work:
javascript:SetParentLocation(Detail.asp?Doc=/doc_root/sk_files/hanna in a
word file.doc)
Basically, the above server side code gives me a link like this:
javascript:SetParentLocation(
This has to be an easy one, but I'm tired and feeling stupid
Thanks for any help!
Steve
I have code that writes links, these links call a javascript function and
pass in a url.
So let;s say I have a client side function like this
function DoIt( url )
{
alert(url);
}
Then, in my server script I have
Response.Write("<br>")
response.write( "<a href='javascriptoIt(" )
response.write( "'Detail.asp?Doc=" )
response.write( Docs(i) )
response.write( "')" )
response.write( "'>" )
response.write( PullNameFromPath(Docs(i)) )
response.write( "</a>"&vbcrlf )
Where Docs(i) is an array of links
The problem is, I need to send the url to the javascript function as a
string, but I can't figure out how to wrap it in ' ' characters without
terminating the <a> tag. For example, this won't work:
javascript:SetParentLocation(Detail.asp?Doc=/doc_root/sk_files/hanna in a
word file.doc)
Basically, the above server side code gives me a link like this:
javascript:SetParentLocation(
This has to be an easy one, but I'm tired and feeling stupid
Thanks for any help!
Steve