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

ActiveX in a HTML

Status
Not open for further replies.

jrp

Technical User
Feb 27, 2000
9
0
0
US
I need to pass parameters to my activeX component, whicH I´m develipong in Visual Basic. Something along the lines of:

<PARAM NAME=&quot;url&quot; VALUE=&quot;
but every time I pur a PARAM tag, the page gives me a &quot;ActiveX is not secure&quot; warning, and the activex doesn´t load.

Can someone help me please. Maybe a tutorial on how to build activex with VB for use on the web (i´ve looked everywhere and can´t find anything that actually helps).

THanks
 
first u need to change the security settings inside the browser. make scripting activex control option as either prompt or enable. i would suggest prompt.
then try your code.
if it doesnt work try then try the function parametrs option. here is the code to this method.
***************Code****************************
**Define a function getval(a,b)inside activex like this*****
function getval(a,b)
myGlobalVar1=a
myGlobalVar2=b ' the values passed from asp will be
'stored inside your defined global variables.
end function

*************************************************
<body>
<OBJECT ID=&quot;UserControl1&quot;
CLASSID=&quot;CLSID:9DD16CC9-5572-4C0F-8F38-6C822AB0FF7D&quot;
CODEBASE=&quot;acxASP.CAB#version=1,0,0,0&quot;>
</OBJECT>
<br><br>
<form name=frm1>
<INPUT TYPE=&quot;text&quot; NAME=&quot;val1&quot; VALUE=&quot;val1here&quot;>
<br>
<INPUT TYPE=&quot;text&quot; NAME=&quot;val2&quot; VALUE=&quot;val2here&quot;>
<br>
<INPUT TYPE=&quot;BUTTON&quot; NAME=&quot;NextDay&quot; VALUE=&quot;Day >&quot;>

</P>
</form>


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

Sub NextDay_OnClick
UserControl1.getval frm1.val1.value,frm1.val2.value

End Sub
</script>
</body>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top