Solved

ActiveX - <param name...>

Posted on 2000-03-28
5
796 Views
Last Modified: 2013-11-18
How can I use, within an ActiveX Control, the data introduced with <param name...> from the HTML document?

thanks
crisoft
0
Comment
Question by:crisoft
  • 2
  • 2
5 Comments
 

Expert Comment

by:TheFly
Comment Utility
crisoft,

the <param name...> will pass a value to a public property within the ActiveX control.

In your ActiveX control -
  declare a public Let/Get property

  within the Let property assign the argument value to a modular level variable.

Hope this helps.

Toodle pip.
0
 

Author Comment

by:crisoft
Comment Utility
Can you give me a small example? I can´t understand your explanation.
0
 

Author Comment

by:crisoft
Comment Utility
Can you give me a small example? I can´t understand your explanation.
-----------------------------7d0262164f8
Content-Disposition: form-data; name="qid"

10318689
-----------------------------7d0262164f8
Content-Disposition: form-data; name="Submit"

Submit
-----------------------------7d0262164f8--
0
 

Accepted Solution

by:
TheFly earned 50 total points
Comment Utility
crisoft,

If your main concern is how to pass a value into an ActiveX control from HTML then try the following instead -

{activeX name}.{property name}= value

heres an example of HTML that i wrote recently that makes use of activex property and event

<p><object name="AssetCom" ID="usr_AssetTV" classid="clsid:9F871D8A-E9F4-11D3-B4AD-0080C7335CA6"
CODEBASE="AssetTV_001.CAB#version=1,0,0,41"
 width="180" height="382">
</object></p>
<body bgcolor="#D9F0ED"></body>
<SCRIPT LANGUAGE="VBScript">
AssetCom.SetIP="10.4.170.70/"
Sub AssetCom_SelectedAsset(AssetId)
parent.frames("Main").location.href="dcs.asp?astrpage=Main&astrAssetId=" & Assetid
End Sub
</SCRIPT>

In this example there is a property in the activeX control called SetIP and the value of "10.4.170.70/" is passed in.


In the activex control itself use the following code -

Option Explicit
Private mstrIPAddress As String

Public Property Get SetIP() As String
    SetIP = mstrIPAddress
End Property

Public Property Let SetIP(astrIP As String)
    mstrIPAddress = astrIP
End Property


If this doesnt help can you give me more info about your problem or concerns.

Good Luck
0
 

Expert Comment

by:botikklopik
Comment Utility
Thanks, TheFly. Your solution also helps me in sorting out the problem. Cheers :)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now