Solved

ActiveX control events on Web Server

Posted on 2002-04-12
1
167 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
ID: 7437539
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

911 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

18 Experts available now in Live!

Get 1:1 Help Now