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
fedkrisAsked:
Who is Participating?
 
nap0leonCommented:
use double-doublequotes

<%
Response.Write ("<a href=""javascript:toggleLayer('uniqueID')"">")
Response.Write ("Link</a>")
%>

Open in new window


outputs this HTML
<a href="javascript:toggleLayer('uniqueID')">Link</a>

Open in new window

0
 
Jesus RodriguezIT ManagerCommented:
replace " with ""
replace one quote with double quote, will be like this
Response.Write (rst3(""appointdate""))
0
 
Wayne BarronAuthor, Web DeveloperCommented:
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
0
 
fedkrisAuthor Commented:
thx!
0
 
Wayne BarronAuthor, Web DeveloperCommented:
I tell you.
Doing it the way I explained it is the best way and most professional way of coding it.

Good Luck
Carrzkiss
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.