Solved

ActiveX control events on Web Server

Posted on 2002-04-12
1
173 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
New Website 15 32
Visual Studio Community 2015 vs. Expression Web 4 8 333
Firewall vs WYSIWYG editor 5 82
Google Autocomplete API 2 99
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…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
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 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…

679 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