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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp+jscript

Status
Not open for further replies.

avivit

Technical User
Jul 5, 2000
456
IL
I need the follwing line (vbscript+jscript) to send 'theText' variable content,
with ' ' before and after the variable, so it will be considered as a string,
when it reaches the jscript "go(text)" function.
Any ideas?

<head>
<script language=&quot;javascript>
function go(text){
alert(text);
</script>
</head>
<body>
<%
...
response.write(&quot;<a href=' onmouseover='go(&quot; & theText & &quot;)'>click</a>&quot;)
...
%>
</body>
 
avivit

Try this,
...
response.write(&quot;<a href=' onmouseover='go(&quot; & chr(39) & theText & chr(39) & &quot;)'>click</a>&quot;)
...



Dunno whether that will work but it should, let me know eh?

DeltaFlyer ;-) DeltaFlyer - The Only Programmer To Crash With Style.
 
Try using \&quot;. This allows a &quot; to be put in a string.

response.write(&quot;<a href=\&quot; onmouseover=\&quot;go(&quot; & theText & &quot;)\&quot;>click</a>&quot;)

Jay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top