events

How do I get clientX and clientY to work inside my "drag" event handler on Firefox?

Mozilla firefox 3.x seems to have a bug when listening to "ondrag" event. The event object doesn't report the position of the object being dragged, clientX, clientY and other screen offsets are all set to zero. This is quite problematic as I wanted to make a proxy element based on the element being dragged and using of course, clientX an...

prevent page refresh by submit a post action from a normal clickevent

Hello, my question is Can I prevent a page refresh from this code As you can see, I submit a post action from a normal click_event, wich I need because live does not support submit events. jQuery('.verwijder').live('click', function() { t=$(this); t.parents(".paneltbnote").animate({ opacity: 'hide' }, "slow",function(){ ...

ASP.Net Onclick event doesn't work with ajaxcontroltoolkit

Hi guys, I designing a web application using vs2008 and c#. I already have done many versions of it and all of them seems to be working fine. Yesterday i decided to replace de vs calendar with a ajax calendar and to do so i used ajaxcontroltoolkit. The new calendar is also working fine. But the buttons i have in my form stoped to work...

Do a self handled event prevent the instance from being garbage-Collected ?

Hi, i read the answer of the question Do event handlers stop garbage collection from occuring?, but what happens when the publisher is the target ? To be more specific, i am using MVVM design for a WPF app. Model-View classes raise a NotifyPropertyChanged on every change. In some classes, i need to call a method when something is modif...

ASP.Net Event Loop Order

I've had so many problems with this (usually with page load events being executed before button click events from the previous page) that I decided to look it up and post the event loop ordering: Method Called Controls ------------------------------------------------------ 1. Constructor ...

Click Entire Row (preserving middle click and ctrl+click)

I have an HTML table, with a link in the first column. I want to allow the user to click on anywhere in the row to activate that link. At the same time I would like to preserve the middle click and ctrl+click functionality of opening a new tab/window. Here is an example of the table: <table id="row_link"> <tbody> <tr> <...

How can I fire an event without waiting for the event listeners to run?

I have a question about events in .NET (C#). I have had to write code for several situations in which I have a background task running and I want to notify a main thread, or controller class, that something has occurred, such as task completed, or finished copying a file, but I don't want the background task to wait for the main thread'...

How should I emulate a mouseenter event using jquery's live functionality?

I want to use jQuery's great live functionality for a mouseenter event, but it's currently unsupported. Below is my first go at a solution, but it doesn't seem optimal. Suggestions? Improvements? // mouseenter emulation jQuery('.selector').live('mouseover',function (e) { // live sees all mouseover events within the selector // o...

Hook onto the adding of new DOM elements with jQuery (or plain JS)

To be clear: I am not asking how to put existing hooks onto new DOM elements. I know about the live() function and the old livequery plugin. I am asking something else. What I want to know is how to hook onto the very creation of new DOM elements. The reason I'm asking is I'm creating a third-party user JS script that doesn't have co...

How to get the most out of computing seminars?

Recently I signed up for DevDays London and I would like to know how people get most of the seminars like this. Skipping a session in favour of some good corridor discussion seems to be one. But do you do some preparation, for example do you check beforehand who is coming to that seminar and try to meet them? Or do you try to lobby you...

How do I sense the end of a user scroll of a .Net TrackBar?

I have a TrackBar and already have the Scroll event treated, but it may trigger 10 times during a user scroll, and I would like to update a file when the user finishes scrolling. How do I sense the "end of scrolling" ? Would MouseUp and KeyUp do for this purpose ? Thx. ...

How to detect Video-off.

Hi. I'm trying to detect video-off by "Power Option" - "Turn off monitor" configuration. When system goes sleeping, it broadcasts WM_POWERBROADCAST. Is there any event broadcasted when monitor goes off? Or is there any settings which I should check periodically? TIA. ...

Using OpenNETCF.Net.Ftp inside a custom class instead of inside a Windows Form

Exact duplicate of Using OpenNETCF.Net.Ftp inside a class instead of inside a Windows Form So far I am using an FTP object inside a Windows form. FTP object runs in a separate thread, so to ensure that my app doesn't freeze up, I use the following piece of code: private void OnResponse(string response) { if (this.InvokeRe...

Can you require a function parameter to be a static constant of the function's Class?

Let's say I have a Custom Event Class, and it has several Event types stored in static Constant: package customEvents { public class { public static const DISAPPEAR_COMPLETELY:String = "disappearCompletely"; public static const SIT_DOWN:String = "sitDown"; public static const STAND_UP:String = "standUp...

Handling key presses in GTK+ (gtkD)

I'm playing around with gtkD (a D binding for GTK+) I have a window object, instance of gtk.MainWindow. I want to handle keypresses on it. How? How do I deal with special keys (e.g. arrow keys, pgup/pgdn etc)? PS I know these kinds of questions can be answered with google and stuff, but I've seen much "simpler" questions on stack...

How do I trigger a Javascript function AFTER the page loads?

** EDIT ** I'm afraid I wasn't in the right direction - the problem isn't what I asked about. the Javascript works as it should, it's the PHP that doesn't show what I want it to on the first "run" - and I'm stil not sure why. Sorry for somewhat wasting your time... ** I have a form that might or might not already contain data in its f...

How to create .NET-compatible events in F#?

Hi! I am trying to publish an event from an F# type, but I want it to be seen as an event from C# or VB. It seems that the correct way to do it used to be IEvent.create_HandlerEvent, but this function doesn't exist in the newest version of F#. So what is the correct way to do it now? ...

Javascript event synchronisation

Is there a possible way to synchronize events in javascript? My situation is following: I have a input form with many fields, each of them has a onchange event registered. there is also a button to open a popup for some other/special things to do in there. My requirement is, that the onchange event(s) are finished before I can open the...

adding a custom event listener in as3

I've done a lot of reading through forum posts and tutorials, but I still can't wrap my brain round events and event listeners. I have a pretty simple example, but I can't get it to work. I have an arrayCollection of custom objects in a repeater, when one of those objects is clicked, I want a different componenet to display data associa...

Firefox extension to log out user after the page has been closed

Hello all. I am writing my first FireFox extension and I have some questions. Maybe someone can help. I have a website which requires login. The sign-in is one user per login type. So if I am logged with the username "tom" from one PC and go to other PC and try to login with the same details, it fails. When I click the log-out button fr...