events

Firefox DOMContentLoaded event problem

Hi, i've created a script that works with the Dom so it has to wait until the Dom is ready before execute every operation. I want that this script can be included in two ways: In the head tag so that it is loaded before the Dom is ready. I've used document.addEventListener("DOMContentLoaded",function(){...},false) for this and it works...

Opera IME support

Hi, i am currently trying to get Input Mode Editor (IME) support working with a designMode enabled IFrame. The problem here is with Opera it seems I don't get any useful notifications from the IME. It seems I get a single keydown with a keycode of 197 if the first time the IME is used - and nothing else ever again (No keycode 229 messa...

Javascript: Controlling the order that event handlers / listeners are exeucted in

Once again the IE Monster has hit me with an odd problem. I'm writing some changes into an asp.net site I inherited a while back. One of the problems is that in some pages there are several controls that add javascript functions as handlers to the onload event (using YUI if that matters). Some of those event handlers assume certain ...

Jquery button.click bug?

I have the following home-grown jquery plugin: (function($) { $.fn.defaultButton = function(button) { var field = $(this); var target = $(button); if (field.attr('type').toLowerCase() != 'text') return; field.keydown(function (e) { if ((e.which || e.keyCode) == 13) { ...

JQuery: which element was clicked?

I have a list with links. These links are links to tables on the same page. What I want to do is whatever link I click in the list it will show its corresponding table and hide all the others. Without adding a different id/class to each link in the list and its corresponding table, is there a way to find out which element was clicke...

Disposing of Objects with long living dependencies

public class ABC { public ABC(IEventableInstance dependency) { dependency.ANewEvent += MyEventHandler; } private void MyEventHandler(object sender, EventArgs e) { //Do Stuff } } Let us say that an instance of ABC is a long living object and that my dependency is an even longer running object. W...

Convert an interface's event from VB.Net to C#

Hi, I'm struggling to convert the below code to C#. Class Class1 Implements IMyInterface Public Event MyEvent(ByVal sender As Object, ByVal e As MyEventArgs) Implements IMyInterface.MyEvent Public Sub New() AddHandler Me.Slider.ValueChanged, AddressOf OnSliderValueChanged End Sub Private Sub OnSliderValueC...

IE not triggering keyboard event on a form with ONE FIELD

I'm seeing my Friend's code here... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> Check action </TITLE> <script> function detectEvent(){ if(window.event.keyCode==13) { alert("you hit return!"); } } </script> </HEAD> <BODY> <form name="name1" onkeyu...

need to get the context value in top of page, where the context value will be set only at the bottom of the page?

<script runat="server"> protected void Page_Load(object sender, EventArgs e) { Response.Write("Page Load:"); } public string setContext(string sName, string sVal) { HttpContext.Current.Items[sName] = sVal; return sVal; } public string getContext(string sName) { st...

Adding controls to page on PreRender

Hi! Do you know any drawback to add controls to a page on PreRender event? please don't answer 'depends on your case' I'm talking in general:-) ...

how to attach onclick event to an array of elements (mootools)

Is there a syntax for the following thing: $$('.a-lot-of-elems').addEvent('someevent',somefunction); ...

After which event should I perform an action after editing a cell in a DataGridView?

I have a WinForms DataGridView control on a form. There are two fields in this DataGridControl: Email Address Resolved Email Address (calculated based on the input in Email Address) After the user inputs or changes a value in Email Address, I want the value in Resolved Email Address to update based on a separate method. What event ...

is it possible to tell if DOM was modified, and which part?

Are there any practical ways to tell what part of the DOM was modified if you know that it will be modified? I am writing a plugin that will be running along with javascript that i did not write. an event will be triggered before DOM is modified, and one event will be triggered after the modification. It is my job to decide what was cha...

Winforms TabControl causing spurious Paint events for UserControl

For our project, we've written a WinForms UserControl for graphing. We're seeing some strange behavior when our control is sited in a TabControl - our control continuously fires Paint events, even when there is absolutely no activity by the user. We only see this in the TabControl. When we site our control in other containers such as ...

Disable the asp button on click of the same button till the process ends

Hi, I need help in the following scenario: On click of a SAVE button in aspx page,some processing will take place. The processing can be of 10-15 minutes.I want to disable the SAVE button till process ends and once process completes, the SAVE button should be enabled. I tried the following but couldnot solve the problem: 1)Cli...

Three ways of ataching to events with dojo. What exactly is the difference?

Is the difference here just various syntactical sugars or is there a reason to use one approach over the other? They all work, and to be a little more confusing what is the difference between this and evt.currentTarget? the CSS #reportDetails table tr:hover td, #reportDetails table tr.hover td { background: #aae4e2; color: #33...

Jquery hook image-starts-loading event

I use some jquery to centre images on my website: fixImg = function(){ w = $(this).width(); if (w > 500) $(this).css('margin', '10px ' + (parseInt((800-w)/2)-30) +'px'); }; $(function() { $('#pagecontent img').each(fixImg).load(fixImg); }); The problem is they only get centered after the entire page has loaded. I...

Scriptaculous Drag: How do I offset the dragging element?

This is an age old problem - but now I'm using scriptaculous its come back to haunt me. When dragging a tree node over other tree nodes I want mouseover to fire for each node I drag over. So I want to position the dragging thing so that its top-left is slightly below and to the right of the mousepointer can anyone help? - thanks ...

jQuery find events handlers registered with an object

I need to find which event handlers an object has registered. eg. $("#el").click(function(){...}); $("#el").mouseover(function(){...}); Is there anyway I can use a function to find out that- $("#el") has click and mouseover registered and possibly iterate over the event handlers. If not a jQuery Object can we find this on a plain...

event flow in action script 3

I tried to dispatch a custom event from some component on the stage and I registered another component to listen to it but the other component doesn't get the event. Here is my code; what did I miss? public class Main extends MovieClip //main document class { var compSource:Game; var compMenu:Menu; public f...