events

How do I know how to design my callback function for my event listener in YUI?

I'm just starting to use YUI. I'm trying to understand how to subscribe elements to different events. It seems pretty simple. Here's some code that I've been tweaking from Yahoo's examples: // "click" event listener for the second Button's Menu instance var onMenuClick = function (p_sType, p_aArgs) { var attributes = { width: { to:...

WPF usercontrol and external events

Hi everybody, I'm a rookie in c# and I'm working on a player with an specialized card. I've work on a usercontrol with the typical buttons stop play, pause and record. The problem is that I don't know how to create the events such that from the principal code (Window) I could manage and call the correspondent function, since from the use...

Dynamically Changing EventHandlers in Web page

I've got a web form (set in a master page) and want to check to see if the page has any changes before exiting (either by success or redirect). If any changes have been made, a dialog is displayed and the user can click ok or cancel. I've created a panel to act as a dialog box (change z-layer, and apply shading and opacity to background...

Event wired up 2 times

Hello, I have an issue with event as Page_Init, Page_Load, there are wired up 2 times when I click on a Gridview inside my page. I have checked about AutoEventWireup, but aspx and ascx are correct (false and OnInit overrided). Event from Gridview are set in Page_Init, but same behavior if it is in Page_Load. I use same event for 2 Gri...

Unsubscribing from an event

I have the following function. What it does is, given a Control (most likely a windows form) i want to have all of the controls contained that "obey" the Rules ( a function screening the controls i want ) subscribe to an event (lets say KeyDown). The question is: how do i unsubscribe? Or more importantly, do i need to? Since i will b...

Window load event not responding in IE8

The following script, largely obtained online (which is used to select css stylesheets called thin, medium and large) has stopped executing in IE8 when the page loads. It is fine in IE7, IE6 and IE5 where it executes both on load and resize. In IE8 it only executes when the page is resized? It works in FF and recent versions of Opera. I...

Does anybody know is this GTrack good plugin?

Hi Guys, Have anybody know any jQuery plugin that able to do event tracking using Google Analytics? I found a good one in this link. It called GTrack. I am thinking whether to use or not... Do you know any similar plugin does this? Thanks, Rob ...

how to determine which JavaScript events are being triggered

As the title says, how can I find what JavaScript events are being triggered as I interact with a webpage? ...

Flex 3 event bubbling set to false.. how to make it bubble then??

I have a flex app with lots of nested views and popup windows.. I'd love to catch all the CHANGE events in the application at the top level.. all of them, simply to notify the user that he has changed something (trust me it makes sense in my app). Now, I tried to add an event listener in the Application creationComplete handler like thi...

When a mousedown and mouseup event don't equal a click

Hi, I've been using some buttons for a while now that have a depressed effect as they are clicked using position relative and a top: 1px in the :active pseudo-class. I had problems with click events not firing and it turned out to be due to the mousedown and mouseup events not firing on the same element. I did a bit of fiddling to make...

How can I loop a process that ends in an event? (c#.NET)

I have a process that calls an event when its done. void DoProcess() { ... ... // Call finished event OnFinished(); } I want to run this process many times. My first idea was to recall the process each time the 'Finished' event was called. void obj_Finished() { DoProcess(); } Would this mean that the st...

Asynchronous Event Dispatch in Java

I'm in the midst of porting a C# program over to Java that makes heavy use of delegates and the delegate's BeginInvoke method to notify of an event asynchronously. Take a data communication thread for example. It might have to notify another worker thread of its state as well as the GUI. It seems to me that the best way to notify of th...

Excel - Open Multiple Windows and Tile on Sheet Tab Click

Hi, I'm trying to write a macro and I have the 2nd half done (tile windows showing specific sheets) but not sure how to do the first half. There are some sheets that when displayed I would like to look at two other sheets at the same time (multiple window tiling). This is easy to set up manually, but I'd like it to happen automaticall...

Flex: Expose component's existing events with new name

I created a flex component that hosts several built in (mx) components such as a listbox and combo box. My component relies on external data, and I need to expose events such as ComboBox.enter and List.click to get certain pieces of data. I was wondering if there is any easy way to do this without having to create my own custom event h...

When to fire a custom control event?

Hello, I am creating a custom control. Let's say I'm reinventing the wheel and creating a custom Button control that derives from the UserControl class(only for example) Well, it of course has a Click event handler. Now my problem is, when do I call this event handler? I know it happens sometime between the Pages OnLoad and OnLoadComple...

determine when contents of html tag changes

Is there a way to determine when the contents of a HTML tag has changed? I would prefer to catch an event rather than polling it. My use case is I have text enclosed in span tags within a rich text editor, and I need to remove the span tags when the enclosing text is modified by the user. ...

Script does not stop while close the browser or click Abort.

I wrote a webcrawler which calls a web page in a do while loop amount 3 seconds totally there are 7000 sites... i parse the data and save it in my DB. sometimes because the script is loading for a long time, i got a timeout in browser, but in background i continues. I see that on my database. Can I prevent this?.. Now it's just poss...

powershell 2 event handling

I want to handle the System.Windows.Forms.NotifyIcon's BalloonTipClicked. That is to say, I want to handle the event when the tip is clicked. My code is below, however I can't catch the event. Please help ! [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") [void] [System.Reflection.Assembly]::LoadWithParti...

Detect when users log out of an application in C#

If the application I'm working on, is there any way to tell when users press the Logout button? ...

Flex - Problem with ResizeEvent.RESIZE

Hi Guys, I'm having a little problem with my resize event... I created a component myself, and this component, at each resize event, runs a complex method. Here is the problem: When I maximize or restore my window, this event is called several times in a real short period of time, not letting enough time to my method to run completely be...