Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    a variable in an <a href> *please help!*

    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')""><%=rs query("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')""><%=rs query("PropTitle")%></a>"
    End if
    %>

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    Change this:

    <%=rsquery("PropTitle")%>

    to:

    " & rsquery("PropTitle") & "

  • #3
    New Coder
    Join Date
    Jan 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Works

    it works, thanks very much for your help


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •