Solved

ActiveX control events on Web Server

Posted on 2002-04-12
1
164 Views
Last Modified: 2013-12-24
I am using a timer ActiveX control on the server.  I am trying to get the "Timer" event but it is not working.  Can i not get custom events from controls in Visual Interdev?  If so...how?
0
Comment
Question by:emidiod
1 Comment
 

Accepted Solution

by:
merlinb earned 100 total points
Comment Utility
This does not make sense. Once a response is sent back the channel is closed - its as though the user does not exist.  So what would the timer do on the server?

It makes sense on the client - but then Netscape 4 & IE 5 have script and DHTML timing facililties.  Look at the setInverval method in javascript.

If you use DTC's then you have to 'advise' the dtc to raise additional events.  This simply adds an on<event> atribute to the control IF a corresponding server-side event handler has been coded.

You can pick up these DTC events in the client (ie before the server round-trip) by including th following client-side function:

function thisPage_onbeforeserverevent(i_strObject, i_strEvent) {
...client side code...
}

The two parameters are strings, that name the object raising the event, and the event name:

  if (i_strObject == 'pbMyButtonDTC'
        && i_strEvent == 'onclick')
  {
    ...handle the click on the client...
    ...then prevent the server-round-trip...
    thisPage.cancelEvent = true;
  }
     
This code also shows how to stop the page from being submitted.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now