Solved

Using methods from client Active X controls

Posted on 1998-09-09
3
180 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 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

735 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