Link to home
Start Free TrialLog in
Avatar of fedkris
fedkris

asked on

how to modify html hyperlink to asp

i have this link:

<a href="javascript:toggleLayer('uniqueID')">test</a>      


i want to add this link in asp:

'Loop through the recordset
Do While not rst3.EOF
      
      'Write the HTML to display the current record in the recordset
      Response.Write (" <strong><img src='images/png/24x24/kalender.png' />&nbsp;")
      Response.Write ("<a href='javascript:toggleLayer('uniqueID')'>")
      Response.Write (rst3("appointdate"))
      Response.Write (" </a>")
      Response.Write (" </strong>")


but he doesn't want the " " in asp, so i modify it to ' ', but then the javascript doesn't work anymore,

can anyone help me? thx

kristof
Avatar of Jesus Rodriguez
Jesus Rodriguez
Flag of United States of America image

replace " with ""
replace one quote with double quote, will be like this
Response.Write (rst3(""appointdate""))
ASKER CERTIFIED SOLUTION
Avatar of nap0leon
nap0leon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You have 1 to many </a> signs.

Do not ever do response.write in your project, unless it strictly calls for it.
And in this case, it does not call for it.

<%
While not rst3.EOF
   %>   
<strong><img src='images/png/24x24/kalender.png' />
<a href="javascript:toggleLayer('uniqueID')">test</a>
<%=rst3("appointdate")%></a>
</strong>
<%rst3.movenext
wend
rst3.close%>

Open in new window


Good Luck
Check out my site for more ASP Tutorials and goodies.
All FREE of course.
http://www.cffcs.com

Carrzkiss
Avatar of fedkris
fedkris

ASKER

thx!
I tell you.
Doing it the way I explained it is the best way and most professional way of coding it.

Good Luck
Carrzkiss