Many people go way overboard and try to dream up elaborate ways to have a client-side ActiveX control communicating with the server to retrieve values. As long as these values are not dependent on user activities AFTER the ActiveX control has been loaded, try something like this:
<% strValue = "some string" intValue = 5 Response.Write("<OBJECT clsid=[blah blah]>") Response.Write("<PARAM NAME=INT VALUE='" & intValue & "'>") Response.Write("</OBJECT>") %> |
And now in server-side JavaScript:
<script language=JavaScript runat=server> var strValue = "some string"; var intValue = 5; Response.Write("<OBJECT clsid=[blah blah]>"); Response.Write("<PARAM NAME=INT VALUE='"+intValue+"'>"); Response.Write("</OBJECT>"); </script> |