1 Reply Latest reply on May 18, 2015 1:16 PM by dng

    Pbd1 + VBScript # Do not work method


      Can't override the Click method. How to do it?



      <%@ Page Title="Home Page" Language="C#" AutoEventWireup="true"

          CodeBehind="Default.aspx.cs" Inherits="testactiveviewaspnet._Default" %>


      <head id="Head1" runat="server">


          <script language="vbscript" type="text/vbscript">

              Sub Pbd1_ReadyStateChange(nReadyState)

                Dim dsp

                set dsp=Document.GetElementById("Pbd1")


                AddHandler dsp.Click, New EDisplay_ClickEventHandler(AddressOf MyDisplay_Click)


              End Sub



             Sub MyDisplay_Click(ByVal lvarX as Integer, ByVal lvarY as Integer)

                Alert "Hello"

             End Sub






              PI ActiveView with VBScript



              <object ID="Pbd1"




         <param name = "DisplayUrl" value="http://localhost:26657/Trend.pdi"/>

              </object><br />      




        • Re: Pbd1 + VBScript # Do not work method

          Hi Nikolay,


          Client-side scripting cannot respond to ActiveView automation events (e.g. Display open events, Display clicks events, etc.). However, client-side scripting can execute public methods and fire events on an ActiveX control.

          To get around the issue, you can look into adding client-side scripting on other DOM elements on the HTML page. If you do want to respond to a mouse click on the display, one alternative would be to overlay a transparent element on top of the display that responds to the mouse click events. Can you give us more information on what you are trying to achieve?