Search Results

Search found 19541 results on 782 pages for 'event handling'.

Page 83/782 | < Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >

  • Preventing a Firefox Extension's load event from triggering across tabs

    - by lgomez
    Hi, I've been working on a Firefox extension that uses an iFrame to do some background scrapping. I have gone through a number of hoops to get it to trigger only once in the window/tab where it should but now when I open a different tab that tab triggers the load event. I found this: https://developer.mozilla.org/en/Code_snippets/Progress_Listeners but the snippets are not there. This was helpful before but doesn't solve the problem: https://developer.mozilla.org/en/Code_snippets/On_page_load More frustrating is that if there is this: https://developer.mozilla.org/En/Listening_to_events_on_all_tabs why should I worry about the normal event listener triggering in more than one tab? Any ideas or examples?

    Read the article

  • jQuery/javascript events - prototype event handler

    - by Brian M. Hunt
    The following code doesn't work as I intuitively expect it to: function MyObject(input) { input.change(this._foo); this.X = undefined; } MyObject.prototype._foo = function() { alert("This code is never called"); // but if it did this.X = true; } var test_input = $("input#xyz"); // a random, existing input var m = MyObject(test_input); // attach handler (or try to) test_input.change(); // trigger event alert(m.X); // undefined I'd expect that _foo() would be called (and, if that ever happens, that the this variable in _foo() would be an instantiation of MyObject. Does anyone know why this doesn't work, and of any alternative pattern for passing an object to an event handler? Thank you for reading. Brian

    Read the article

  • jquery - lose click() event after ajax call???

    - by niczoom
    At the following webpage liamharding.com/pgi.php I have an option panel on the left side of the page which opens and closes upon clicking the panels 'arrow', this works fine until you select a market (for testing use one of the 'Random Walk' markets and click 'Show/Refesh Graphs'), this then makes an ajax call using get_graph(forexName, myCount, divIsNew) function. Once this call is completed a graph(s) is displayed and then my options panels click() event does not work? The ajax call returns the data in a variable ajax_data, the problem happens when I perform the following code var jq_ajax_data = $("<div/>").html(ajax_data); . I need to wrap it in a so I can extract data from it using jQuery. If this line of code is commented out the click() event works fine ?? Hope somebody can help, I have spent a lot of time but cant find what the problem is.

    Read the article

  • VLC player event catch

    - by user350632
    In my C# application i need to trigger some events when a VLC player (preferably) starts playback (a play button is pressed in VLC for example).Tried Windows Media Player classic with Microsoft Spy++ and observed messages that are sent when playback starts\repeats but i don't know how i could "catch" those messages in my C# code.So my question: is there any way to hook up to event in VLC (or WMP) and get notified about playback status (play, stop, start of repeat). My goal is to create a C# function that waits for start of playback event in player and then triggers some actions in my application (this should also happen when playback ends and starts repeating). What approach should i take here? Just to clearify: I don't want to embedded a new instance of VLC in my app, but instead control/read the "real" full version of VLC, started seperatly by the user

    Read the article

  • handle exit event of child process

    - by Ehsan
    I have a console application and in the Main method. I start a process like the code below, when process exists, the Exist event of the process is fired but it closed my console application too, I just want to start a process and then in exit event of that process start another process. It is also wired that process output is reflecting in my main console application. Process newCrawler = new Process(); newCrawler.StartInfo = new ProcessStartInfo(); newCrawler.StartInfo.FileName = configSection.CrawlerPath; newCrawler.EnableRaisingEvents = true; newCrawler.Exited += new EventHandler(newCrawler_Exited); newCrawler.StartInfo.Arguments = "someArg"; newCrawler.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; newCrawler.StartInfo.UseShellExecute = false; newCrawler.Start();

    Read the article

  • MouseWheel Event Fire

    - by Rahat
    I have a problem on calling my private method on MouseWheel event. In fact my mouse wheel event gets fired properly when i only increment a variable or display something in Title bar etc. But when i want to call a private method, that method gets called only one time which is not the requirement i want to call that method depending on the speed of scroll i.e. when scroll is done one time slowly call the private method one time but when the scroll is done in high speed call the private method more than one time depending on the scroll speed. For further explanation i am placing the sample code which displays the value of i in Title bar and add it in the Listbox control properly depending on the scroll speed but when i want to call the private method more than one time depending upon the scroll speed, that method gets called only one time. public partial class Form1 : Form { ListBox listBox1 = new ListBox(); int i = 0; public Form1() { InitializeComponent(); // Settnig ListBox control properties this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.listBox1.FormattingEnabled = true; this.listBox1.Location = new System.Drawing.Point(13, 13); this.listBox1.Name = "listBox1"; this.listBox1.Size = new System.Drawing.Size(259, 264); this.listBox1.TabIndex = 0; // Attaching Mouse Wheel Event this.listBox1.MouseWheel += new MouseEventHandler(Form1_MouseWheel); // Adding Control this.Controls.Add(this.listBox1); } void Form1_MouseWheel(object sender, MouseEventArgs e) { i++; this.Text = i.ToString(); this.listBox1.Items.Add(i.ToString()); // Uncomment the following line to call the private method // this method gets called only one time irrelevant of the // mouse wheel scroll speed. // this.LaunchThisEvent(); } private void Form1_Load(object sender, EventArgs e) { this.listBox1.Select(); } private void LaunchThisEvent() { // Display message each time // this method gets called. MessageBox.Show(i.ToString()); } } How to call the private method more than one time depending upon the speed of the mouse wheel scroll?

    Read the article

  • keypress event not being triggered only at start and end of text field in Firefox (JQuery)

    - by rlivsey
    I'm listening for keypress events on an input field with delegation. For some reason, Firefox doesn't trigger the delegated event for cursor UP when at the start of the field, or cursor DOWN when at the end. LEFT and RIGHT work as expected all the time. Directly binding an event listener to the field works fine, so it has to be something to do with delegation. Does anyone know if this is a know issue, I couldn't find anything on Google/forums etc..? $("div").delegate(":input", "keypress", function(e){ // doesn't get triggered }); $("div :input").bind("keypress", function(e){ // gets triggered fine }); Here's a demo which shows the issue - http://livsey.org/jquery.delegation.html

    Read the article

  • Different actions on multiple Keydown event

    - by Billy Mitchell
    Okay, so my question (im hoping) is fairly simple. I want to know what to do so that I can create different events for the same keycode. For instance Id like to fade out a div and fade a new one in on the first keypress, then fade that one out and fade a new one in on keypress. Thanks! $(document).keydown(function() { if (event.keyCode == '40') { $('.div-1').fadeOut("slow") $('.div-2').fadeIn("slow") // I'd like this event to occur on the Second keydown $('.div-2').fadeOut("slow") $('.div-3').fadeIn("slow") } });

    Read the article

  • getting number of hours until the next event

    - by Andrew Heath
    I've got a table with this data: [ID] [event_name] [last_event] 1 stats 2011-01-01 01:47:32 last_event is a timestamp. The event occurs every 48 hours (it's a cron job). I'd like to show my users the number of hours until the event executes again. So far I've got: SELECT (lastFinish + INTERVAL 48 HOUR) FROM `cron_status` which gives me the exact time and date of the next occurence: 2011-01-03 01:47:32. So I figured if I subtracted the current datetime... SELECT ((lastFinish + INTERVAL 48 HOUR) - SYSDATE()) FROM `cron_status` which (I think?) gives me the difference in unix time: 1980015. But if I divide that by 3600 to convert the seconds to hours... SELECT (((lastFinish + INTERVAL 48 HOUR) - SYSDATE())/3600) FROM `cron_status` I get numbers an order of magnitude too high: 549.99. Where am I going wrong? The target is returning the number of hours until the next execution. Thank you!

    Read the article

  • Comobox event SelectedValueChanged

    - by IordanTanev
    Hi, i have simple question may be someone asked it before me but i could not find it.Let say i have datatable that has some data from the database and i want to bind it to a combobox i use standart code like this comboBox1.BeginUpdate( ); comboBox1.ValueMember = "id"; comboBox1.DisplayMember = "name"; comboBox1.DataSource = dt; comboBox1.EndUpdate( ); The problem is during this binding the event SelectedValueChanged is fired.The problem is that rebind combo several times when outher values change and every time i must do sometihn like this comboBox1.SelectedIndexChanged -= new System.EventHandler( this.comboBox1_SelectedValueChanged ); my question is there a smarter way to skip the event when i comes from databinding not from user input.The problem is that i want to do it some how globaly in my control that inherits combobox and not to do it everytime in every from Best Regards, Iordand

    Read the article

  • Determining a Flex event's default behavior

    - by Jeremy Mitchell
    How can I tell what the default behavior for a cancelable event is? For example, I read somewhere that the TextEvent.TEXT_INPUT has a default behavior and that default behavior includes adding a text character associated with the key that was pressed to a TextInput. That makes perfect sense. But if I hadn't read that, how would I know what the default behavior is? Other than guessing. In this case, it's probably obvious. But in other situations, it might not be. For example, in the docs, look at DataGridEvent.HEADER_RELEASE's cancelable property. It says: cancelable: true so, there appears to be a "default behavior" associated with a DataGridEvent.HEADER_RELEASE event. But what is it? And why would I cancel it if I'm not really sure what it is? :) thanks.

    Read the article

  • triggering an onchange event of a select box

    - by swathi
    Hi all, I have a select box, which i can populate using two methods. First - Just by selecting any one of the option in the select box. Second - I have a link just beside the select box.Clicking this link takes me to a page2, which has the same options but as links in page2.When i click one of them , it populates the select box. Selecting the option directly from the "select" triggers an onchange event in it. But when i click the link, select my required option from that page, it does not trigger the onchange event in the select box. I am not sure where i am doing a mistake. Thanks in advance.

    Read the article

  • Can I access the function body of an event listener using nodeJS jsdom

    - by Zhami
    I am using jsdom with nodeJS. I load in a large HTML document, and am using jQuery to navigate the DOM. I have a case where I have an element, and I need to access the function body of an event listener (onclick). The event listener was added in the source HTML: <a href="#" onclick="javascript:window.open('http://<rest-of-url>'); return false;"></a> The onclick attribute of the DOM element is undefined. btw: what I really want to do is get the URL (please note that <rest-of-url> is not what is in the source, a real URL spec is there) that is specified in the source.

    Read the article

  • Prevent click event on the clicked element?

    - by nainy
    I have a click event on the body of my document: $("body").on('click.findElem', function(e) { e.stopPropagation(); e.preventDefault(); self.hinter(e.target); return false; }); It basically catches the clicked target and does something to it. However, there are some targets that already have a click event on them, and they prevent my click from being executed at all. How do I overcome that issue? I tried unbinding it, but the click doesn't even work at all to actually execute the unbinding.

    Read the article

  • google analytics - event tracking without affecting bounce rate

    - by cmancre
    Hi, I'm studding a way of using Google Analytics to track Ad impressions/clicks. Looks like event tracking is the way to go. Tracking clicks it's easy to implement. My doubt resides on impressions: using event tracking on page load will cut down my bounce rate to 0 using a second profile doesn't look elegant (leave it for last resource) GOAL: John loads page A and leave. Count 1 for impressions and 1 for bounce rate as it should. Is there a way of doing it with Google Analytics?

    Read the article

  • fire click event for button

    - by Hadas
    I have column with buttons like this: var grid = new Ext.grid.GridPanel({ store: store, columns: [ { header: 'Issue',renderer: function(val){ return '<input type="button" class="btnissue" value="Issue" />'; }, dataIndex: 'btn', width: 49 } ], renderTo: Ext.get('Issuing') }); and I want to fire click event for this buttons. if I write : Ext.getCmp('btnissue').on('click',function(){ alert("message"); }); It say the button not exist. So how can I fire this event?

    Read the article

  • Jquery remove and add back click event

    - by London
    Is it possible to remove than add back click event to specific element? i.e I have a $("#elem").click(function{//some behaviour});, $(".elem").click(function{//some behaviour});(there are more than 1 element) while my other function getJson is executing I'd like to remove the click event from the #elem, and add it again onsuccess from getJson function, but preserve both mouseenter and mouseleave events the whole time? Or maybe create overlay to prevent clicking like in modal windows? is that better idea? edit : I've seen some really good answers, but there is one detail that I omitted not on purpose. There are more than one element, and I call the click function on the className not on elementId as I stated in the original question

    Read the article

  • Sleep a thread until an event is attended in another thread from a different class

    - by Afro Genius
    I have an application that fires 2 threads, the 1st launches another class to do some processing which in turn launches a 3rd class to do yet more processing. The 2nd thread in the main class should wait until some event in the 3rd class completes before it performs its job. How can this be achieved? I had tried implementing a wait/notify to share a lock object between the two threads but technically this will not work as I found the hard way. Can I share a lock between classes? Note, an instance of the 3rd class is declared in the 1st class and passed as parameter to the 2nd class. Also I tried creating boolean value in 3rd class that tells when event is complete then poll 2nd thread till this value is true. This worked but is not very desirable. Also is actionListner a better approach to this problem?

    Read the article

  • Image input onclick event being fired when enter button Pressed

    - by Anthony
    I have a strange problem where an onclick event on an input image is being fired when i hit enter in input text box <form id="MyForm" action="/someaction"> <input type="image" src="someimage.jpg" onclick="doStuff();$('#MyForm').submit();" /> <input type="text" name="textInput"/> </form> When the cursor is in the text box and i hit enter, rather than the form being submitted it calls the onclick event on the image input. Any ideas whats going on ?

    Read the article

  • Observing 'click' event on <a> tag generated by scriptaculous Builder

    - by bratsche
    I'm using scriptaculous Builder to generate some DOM elements dynamically, and one of them is a link tag. I wasn't sure how to generate this with the click callback inline along with the rest of the Builder code, so I'm generating the link tag ahead of time and then inserting it with the rest of the Builder phase. The problem is that the callback for the link is never actually executed when I click the link, and the URL bar changes to http://localhost/foo/bar/# instead. The callback method is a part of my class, so I'm binding it as an event listener ahead of time. var Foo = Class.create ({ initialize: function () { this.closeBinding = this.doClose.bindAsEventListener (this); }, generate: function () { /* Create the link and bind the click listener */ var close_link = Builder.node ('a', { href: '#' }, 'Close'); Event.observe (close_link, 'click', this.closeBinding); /* Generate the new DOM nodes */ return Builder.node ('div', [ Builder.node ('h2', 'This is a test'), close_link ]); }, doClose: function (evt) { /* This code is never called when I click the link. */ } });

    Read the article

  • live click event of an image is not supported in ie6

    - by Mohan Ram
    I am retriving this content from ajax <div id="content"> click on image to close<img id="img_id"> </div> jQuery code to close div: $("#img_id").live('click',function(){ $("#content").slideUp('fast'); }); Once I click on image div closes. But in IE6 nothing happens. I don't know why IE6 doesn't take live click event, or if the problem is with image id. Once image clicked (live click event not triggered in IE6) What would be the reason?

    Read the article

  • Find host from ItemContainerGenerator.itemChanged Event

    - by Mohanavel
    I'm working on C# 4.0, WPF. I have three ListView, and all three control have the same ItemContainerGenerator_ItemsChanged" event. So my problem is, when ever the event triggered, i have to find the host. lst1.ItemContainerGenerator.ItemsChanged += new System.Windows.Controls.Primitives.ItemsChangedEventHandler(ItemContainerGenerator_ItemsChanged); lst2.ItemContainerGenerator.ItemsChanged += new System.Windows.Controls.Primitives.ItemsChangedEventHandler(ItemContainerGenerator_ItemsChanged); lst3.ItemContainerGenerator.ItemsChanged += new System.Windows.Controls.Primitives.ItemsChangedEventHandler(ItemContainerGenerator_ItemsChanged); void ItemContainerGenerator_ItemsChanged(object sender, System.Windows.Controls.Primitives.ItemsChangedEventArgs e) { //TODO: Find host and proceed. **REAL Problem** // ListViewItem's Visible property has been set based on the deletion button click, // So at one place i have to get the count of rows which are visible and proceed // with related buttons enable/disable operation. }

    Read the article

< Previous Page | 79 80 81 82 83 84 85 86 87 88 89 90  | Next Page >