//  home   //  advanced search   //  news   //  categories   //  sql build chart   //  downloads   //  statistics
 ASP FAQ 
Home
ASP FAQ Tutorials

   8000XXXX Errors
   Alerts
   ASP.NET 2.0
   Classic ASP 1.0
      COM / ActiveX Components
      Forms
      General Topics
      Date/Time Routines
      Email Scripts & Info
      Files/Directories & FSO
   Databases
   General Concepts
   Search Engine Optimization (SEO)

Contact Us
Site Map

Search

Web
aspfaq.com
tutorials.aspfaq.com
classicasp.aspfaq.com

ASP FAQ Tutorials :: Classic ASP 1.0 :: COM / ActiveX Components :: How do I pass server-side values to a client-side ActiveX control?


How do I pass server-side values to a client-side ActiveX control?

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>

Related Articles

Can I code ISAPI filters / extensions with Visual Basic?
DLL: How do I avoid 'Permission Denied' when re-compiling?
How do I detect browsers without components?
How do I determine if a COM object is installed?
How do I determine if a VBScript-based object exists?
How do I generate PDF files from ASP?
How do I generate RTF documents from ASP?
How do I handle MD5 from ASP?
Should I close my objects and/or set them to nothing?
Should I store objects in session/application scope?
Should I use CreateObject or Server.CreateObject?
When does ASP release COM objects?
Where can I get a shopping cart for my web site?
Where can I get an updated version of browscap.ini?
Why do I get 'Server.CreateObject Access Error'?
Why do I get 8000401A errors?
Why do I get 80040111 errors?
Why do I get 80040112 / 8007045A errors?
Why do I get 800401F3 / 800A01AD errors?
Why do I get 80040460 errors?
Why do I get 80040514 errors?
Why do I get 8007000E errors?
Why do I get 8007007E / 8007007F errors?
Why do I get 80072EE2 errors?
Why do I get 80072EE5 errors?
Why do I get 800A0030 errors?
Why do I get 800A005B errors?
Why do I get 800A9C68 errors?
Why do I get 800C0007 errors?
Why does Browscap give me 'unknown' or tell me IE is Netscape?

 

 


Created: 10/30/2001 | Last Updated: 12/14/2003 | broken links | helpful | not helpful | statistics
© Copyright 2006, UBR, Inc. All Rights Reserved. (253)

 

Copyright 1999-2006, All rights reserved.
Finding content
Finding content.  An error has occured...