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 IamaSherpa 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>
 
Deltaflyer (Programmer) Nov 16, 2000
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.
 
Sorry. I was sure it would work. But...
it doesn't.
Thanks alot for yout efforts.
More suggestions?
:)
 
yes !
1- don't cross post too much
2- can you put some code on the page ?? if yes it's easier to pass the &quot;test&quot; value as a url parameter (with asp if you like) and to get it on the page with a javascript function
hope this helps !
 
1. IZA - can u be more specific?
I need tp pass string actually.
I don't exactly understand what you mean.
Thanks

2. Pepper. I will try it. thanks.
 
i think pepperpepsi's idea is better than mine and works fine.
if it doesn't, tell me. But his solution is more simple.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top