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!

Passing value from Server to Client

Status
Not open for further replies.

beer

Programmer
Mar 13, 2001
19
US
Hello All,

I am experiencing a problem when trying to pass value from ASP to client VBScript, but I can pass it to Javascript. Here is the code:

**Assume that the Variable = "123.txt"

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>

function funA()
{
funB('<%=Variable%>');
}
</SCRIPT>

<SCRIPT LANGUAGE=&quot;VBScript&quot;>
Sub funB(Vairable)

MsgBox InStr(1, &quot;456.txt, 123.txt&quot;, Variable, 1)

End Sub

The funB returns 0. Why? Should not it be 10 where 123.txt starts?

Thank you,
Beer

 
You spelled the word Variable differently in the argument list than you did in the MsgBox call. Is this copied directly from your code?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top