Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 9th, 2004, 06:25 AM
Registered User
Join Date: Mar 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using an activex event with javascript

I would like to use an activex event with javascript but the probles is that I havent got any Idea.
The event is Click and it has two parameters Col and Row.
The activex control is farpoint spread 6.0 but I only want to kwnow how i use an activex event with javascript in general.
The procedure can be similar to this:

<script Language="vbScript">
    sub ss_Click(Col,Row)
    if col=2 or col=1 then
    msgbox(Col&" "&Row)
    end if
    end sub


I haven´t got any idea to do anything because I´m a novice in this area.


  #2 (permalink)  
Old March 9th, 2004, 06:49 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

If your ActiveX is embedded via an object tag then the easiest way is to give it an id, e.g. objSS then use:
<script type="text/javascript" for="objSS" event="onclick(Col, Row)">
  if (Col == 2 || Col == 1)
    alert(Col + " " + Row);


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling ActiveX component method from JavaScript Pera Pisar Javascript 3 September 7th, 2007 07:58 AM
How to suspend code till Activex event is handled fossx VB How-To 1 June 1st, 2007 10:57 AM
Javascript & ActiveX Excel Object Process interrupt Javascript How-To 1 February 7th, 2007 08:30 AM
how 2 use ActiveX in JavaScript with MasterPage ? quyps ASP.NET 2.0 Professional 0 November 14th, 2006 03:58 AM
buggy event firing in ActiveX controls pgtips Pro VB 6 6 July 10th, 2003 02:38 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.