Solved

ActiveX control events on Web Server

Posted on 2002-04-12
1
174 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

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…
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 connect a WordPress website to Google Analytics. 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 :…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…

751 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