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!

String - Double Quotes and Single Quotes 1

Status
Not open for further replies.

itflash

Programmer
Jul 18, 2001
535
GB

Hi all

Have a dilema

I have an image with an onclick event.

This onclick event needs to pass a Jscript function two parameters. The first one is numeric, so thats fine. The second is character.

The code is below.

<%

response.write(&quot;<img border='0' src='buttons/documents.gif' onclick='myfunction(&quot; & rtrim(myset(&quot;userid&quot;)) & &quot;, &quot; & rtrim(myset(&quot;username&quot;)) & &quot;)'>&quot;)

%>


This does not work because it really wants either &quot; or ' around the strung in username.

Any ideas how I can reformat my string so it will work?



Thanks
ITFlash
 
response.write(&quot;<img border='0' src='buttons/documents.gif' onclick='myfunction(&quot; & rtrim(myset(&quot;userid&quot;)) & &quot;, &quot; & chr(34) & rtrim(myset(&quot;username&quot;)) & chr(34) & &quot;)'>&quot;)

Water is not bad as long as it stays out human body ;-)
 
You're welcome Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top