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

Passing a server variable to a client function

Status
Not open for further replies.

SonJ

Programmer
Oct 24, 2002
166
GB
Hi there,

Does anyone know if I can pass a server variable to a client function?

I am using VBScript for the server scripting languages and JavaScript for the client side scripting.

At the moment, I have the work around of Response.Write the client function and pass the server variable to it.

If anyone knows of a "neater" way to do it, any ideas would be much appreciated.

 
client side:

<script>
myText =&quot;<%=objRS(&quot;text&quot;)%>&quot;
if (myText != &quot;&quot;){
alert(myText)
}
</script> -- Just trying to help... LOL [ponder]
 
Thanks for the tips!

mwolf00 - I have done it that way before, but when I passed it onto the developer that needs to do it, he said that he'd rather not do it that way - go figure! His alternative is &quot;very&quot; messy :)

But in the meantime, thanks very much for the tips!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top