AnsweredAssumed Answered

Pbd1 + VBScript # Do not work method

Question asked by Nikolay on May 13, 2015
Latest reply on May 18, 2015 by dng

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" %>

<html>

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

    <title></title>

    <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

//!!!!!!!!!!!!!!!!!!!!

    </script>

</head>

<body>

    <h2>

        PI ActiveView with VBScript

    </h2>

    <p>

        <object ID="Pbd1"

        WIDTH="90%"

        HEIGHT="90%"

        CLASSID="CLSID:4F26B906-2854-11D1-9597-00A0C931BFC8">

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

        </object><br />      

    </p>

</body>

</html>

Outcomes