events

New Thread required on FormClosing?

I have a button click event handler which says this.Close() In the FormClosing event I detect unsaved changes and say "Do you want to Save?" If they say Yes I set e.Cancel = true and then call my Save method. If the data is saved ok in my Save method at the end I say this.Close() but the form stays open. This seems such a simple idea...

Jquery Cookbook Modal button

I've been at this for two days and can't seem to get it. Basically, I'm using the JQuery Cookbook modal from scratch. My problem is the form html page loads fine but the code will not recognize my submit button. Here's the relevant parts of the code: Separate HTML: <div id="contact"> <form action="" id="register_form" method="post"> ...

Events on PHP. Is it possible?

I'm coming from the C# world and has just started doing a little PHP coding, so I was wondering if it is possible to use events on PHP, or if it is planned to include this feature in a future release. If you have a way to simulate it, different than this, it would be very appreciated, thanks. ...

Problems with javascript scope in firefox

Hello! <div id="myElement1"></div> <div id="myElement2"></div> <script> window.onload = function() { document.getElementById("myElement1").onclick = function() { for (i = 0; i < 2; i++) { document.getElementById("myElement2").onmouseover = func; function func() {alert("hello"); } } } } </script> In...

Can I hook up to any forms authentication sign out event?

I would like to do som extra processing whenever a user is signed out from forms authentication. According to this MSDN article there is a FormsAuthentication_OnAuthenticate event but I need something like a "FormsAuthentication_OnSignOut" (Which doesn't exist) Any ideas? /J ...

AS: How to handle custom event in parent component

Hi! I defined a simple event class: public class NewMoveEvent extends Event { public function NewMoveEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=true) { super(type, bubbles, cancelable); } } } Then in custom mxml component, I defined a button which triggers it: <mx:Panel xmlns:mx="http://www.adobe....

Catching DTE event in Javascript

I am trying to catch Visual Studio Extension events in browser javascript, DTE is available through window.external: window.external.DTE.Events.SolutionEvents.Opened = ... Access is ok up to "Events", but a SolutionEvents seems not to be found. I've checke the #imported tlb, _Events does have a get_SolutionEvents member. DTE is the c...

Member Function Pointer with base class argument accepting derived class argument

So I'm working on this event management class. I'm storing a list of pointers to member functions of the signature void (Event*) where Event is just a struct that stores some random data at the moment. typedef boost::function<void(Event*)> Callback; typedef vector<Callback> CallbackList; class EventManager { public: template<typenam...

C# Event Passing/Bubble Up

Hi, I subscribe to an Event inside a class. Such as MainStation mainStation = StationFactory.GetMainStation(); mainStation.FrequencyChanged += new EventArgs(MainStation_FrequencyChanged); My MainStation class raises the event on some condition by just calling the event FrequencyChanged() The Problem Now I have a scenario whe...

How to track a long hold in finger in iPhone ?

Hi, How could I track event like touch on iPhone screen for 2 seconds. Like in safari to save image for image added to a UIWebView.. ? Thank you and Kind Regards, Tharindu Madushanka ...

Facebox plugin is not removing previous content when used with live

Hi, I am using facebox in the content that I have loaded with ajax Normally, the plugin removes previous content, so clicking multiple times on the same link would still show the one image. But not used with live. It will stack up the images Setting it to empty below will not work??It already does that in the plugin also? $('a[rel*=...

Define an event on iFrame element with jQuery

Hi, I try to define a live event on img tags store on a iFrame. For example, I would like obtain a simple javascript alert box when I click a image on my iFrame. Do you know how i can define the events for the iFrame, because I would like to put a thing like $('img').live("click",function().... but only for the elements on iFrame. Tha...

Javascript MouseOver / MouseOut children events

I have an element with some child elements. When the mouse leaves the parent element I want to hide the parent and it's children. Problem I'm having is that when I hover over any of the children, the mouseout event is being fired. What's the best way to prevent this? I really only want the event to fire when the mouse is not within the p...

Idiomatic jQuery delayed event (only after a short pause in typing)?

Here is some jQuery for a search box that I expect is actually an antipattern, and am sure there is a much better solution for that I would love to be pointed towards: I will describe it in comments then just give the code, since the comments may be more clear and simple than the code: // set up a function call on keypress. // functio...

UserControl Load event not fired

Hi I have WinForms application. My Form derived class has UserControl derived class. I simply put several controls into one UserControl to simplify reuse. The Load event of UserControl is not fired. Do I have to set some property? ...

jquery auto refresh script problem

hey guys i wrote myself a block of jquery codes to auto refresh a div just want it to reload every 10 seconds . but problem is after the time i specified in my code script going crazy reload every second <script> var auto_refresh = setInterval(function(){ $(\'#showDIV\').slideUp(\'300\').load(\'movies.php\').slideDown(500);},...

Why this javascript event isn't working on IE .. ?

I am trying to load options to drop-down list depending on the selection made on other drop-down list. I have written a code which works on almost all major browsers, FF, Opera, Safari but doesn't work in IE7. Here is my Javascript code: <script type = "text/javascript"> var txt1 = "<option>state1<\/option><option>state2<\/option><opti...

Events Fired When DataGridView.SelectAll Called

What events are fired when .SelectAll() is called on a DataGridView? I want to intercept some cell selection without having to inherit another DataGridView and override the SelectAll() method. ...

In JavaScript is it possible on IE to register one event listener to capture all the change, focus, and blur events on the page?

In non-IE browsers: The change event bubbles, so you can catch it when it gets to document in the bubbling phase. The focus and blur events don't bubble, but you can catch them on the capture phase with one event listener on document. On IE: None of those 3 events bubble (including the change event, which is not spec compliant). Ther...

Problems Detecting Alt Key on the Control.KeyUp event

Hi, I have a control with KeyDown and KeyUp events as shown below. The problem I am having is that 'x' is TRUE in KeyDown but always FALSE in KeyUp. I am trying to detect the Alt key (as you may have guessed). Is there a gottcha that I don't know. I mean, when I press Alt it detects it ok but on keyup it's false. Any suggestions/ideas...