?
Solved

Using methods from client Active X controls

Posted on 1998-09-09
3
Medium Priority
?
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

771 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