...

View Full Version : a variable in an <a href> *please help!*



timothyjgraham
01-30-2005, 05:47 AM
Hi, i'm actually new to programming- was more a graphics person before. so this question may seem basic! anyhow if anyone can help here, i'd be VERY appreciative! in the following, i'm trying to make it so that the variable PropTitle can be used as a link. i'm very poor at this at the moment, but trying to learn. i just don't know how to make it work! thank you so much if anyone can help..

timothy graham.

<%
myLink = ""
If rsquery("pathtoImage") <> "" and rsquery("pathtoImage") <> "no_pic.jpg" then
myLink = "<A href=""javascript:;"" onclick=""window.open('/property.asp?listingid=" & rsquery("listingID") & "&details=" & rsquery("pAddress") & ", " & left(ucase(subName),1) & right(lcase(subName),len(subName)-1) & "','property','width=700,height=500,toolbar=0,location=0,status=0,scrollbars=1,resizable=1')""><%=rsquery("PropTitle")%></a>"
End if
If rsquery("pathtoImage2") <> "" or rsquery("pathtoImage3") <> "" then
myLink = "<A href=""#"" onclick=""window.open('/property.asp?listingid=" & rsquery("listingID") & "&details=" & rsquery("pAddress") & ", " & left(ucase(subName),1) & right(lcase(subName),len(subName)-1) & "','property','width=700,height=500,toolbar=0,location=0,status=0,scrollbars=1,resizable=1')""><%=rsquery("PropTitle")%></a>"
End if
%>

glenngv
01-31-2005, 02:53 AM
Change this:

<%=rsquery("PropTitle")%>

to:

" & rsquery("PropTitle") & "

timothyjgraham
02-02-2005, 07:52 AM
it works, thanks very much for your help



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum