Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Single Quotes Help

Status
Not open for further replies.

mdr227

Programmer
Nov 17, 2000
114
US
I have a javascript function that I want to use on an ASP page in a section where I am using response.write. The problem is that I use double quotes around the whole thing and then the onclick event uses single quotes around all that syntax, but within the onclick event I need to use single quotes again. The syntax I am trying to use is:

response.write(&quot;<b>[<a href='banquetnote.html' onclick='NewWindow(this.href,'name','200','200','yes');return false;'>Important Note</a>]</b>&quot;)

Does anyone know how I can make this work? Thanks.
 
Use double-double quotes in the response.write to specify double quotes.

Code:
response.write(&quot;<b>[<a href=&quot;&quot;banquetnote.html&quot;&quot; onclick=&quot;&quot;NewWindow(this.href,'name','200','200','yes');return false;&quot;&quot;>Important Note</a>]</b>&quot;)


Wushutwist
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top