Solved

Using methods from client Active X controls

Posted on 1998-09-09
3
167 Views
Last Modified: 2013-12-25
After using the <object id="Alarm" classid="clsid:6262D3A0-531B-11CF-91F6-C2863C385E30" width="923" height="461"> to create an object, I want to use methods of the object to set values in the object.  Can this be done?  If so how?

I've tried the following code to no prevail.

<object id="Alarm" classid="clsid:6262D3A0-531B-11CF-91F6-C2863C385E30" width="923"
height="461">
</object>
<%
    Alarm.Cols = 10
%>
Get the following error
Microsoft VBScript runtime error '800a01a8'

Object required: 'Alarm'

Keith
0
Comment
Question by:kjsmith3
  • 2
3 Comments
 
LVL 28

Expert Comment

by:sybe
ID: 1854891
I am afraid you try to mix server side script (ASP) with client side objects. You can't. Client side scripts/objects run in the browser on the client's machine, server side scripts/object run on the webserver machine.

If you want to access client-side ActiveX control methods, you'll have to use client side script:

<script language="VBScript>
code for client

<script>
0
 

Author Comment

by:kjsmith3
ID: 1854892
I was afraid of this.  Could you give a little code snipit which shows the use of an object with client-scripting where methods from the object are being used?
0
 
LVL 28

Accepted Solution

by:
sybe earned 50 total points
ID: 1854893
<object id="Alarm" classid="clsid:6262D3A0-531B-11CF-91F6-C2863C385E30" width="923" height="461">
</object>

<script language="VBScript>
Alarm.Cols = 10
<script>

Of course it depends on the object with methods and properties you can access with scripting. Some are read-only.

But with this code you won't get the error 'Object required'.


0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This video teaches users how to migrate an existing Wordpress website to a new domain.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

707 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

10 Experts available now in Live!

Get 1:1 Help Now