Search Results

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

Page 56/782 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • Get array of elements from event

    - by Anton
    I have few nested DIV elements. For example: <div id='id1'><div id='id2'>content</div></div> I attach event to DIVs event handler using jQuery: $('div').click(function () { //some code }); There will be two events when user click on content. So there will be two simultaneous events. Is it possible to get inside event handler array of objects (DIVs) what have click event? May be it is possible using other framework but jQuery?

    Read the article

  • C# Event routing in code behind

    - by Nate
    I'm building a WPF MVVM-ish application. I want to be able to display an event log containing items in a collection that exists in my viewmodel. I want any of the objects in the model to be able to add data to the event log. Therefore every object needs to be able to pass data back to one central collection for databinding in the view. I could implement an event in every one of my data classes and manually pass the events up the object heirarchy but this seems super clumsy. On the visual tree a Routed Event would take care of this, is there some equivelent in the model scope? Any other ideas?

    Read the article

  • event vs thread programming on server side.

    - by AlxPeter
    We are planning to start a fairly complex web-portal which is expected to attract good local traffic and I've been told by my boss to consider/analyse node.js for the serve side. I think scalability and multi-core support can be handled with an Nginx or Cherokee up in the front. 1) Is this node.js ready for some serious/big business? 2) Does this 'event/asynchronous' paradigm on server side has the potential to support the heavy traffic and data operation ? considering the fact that 'everything' is being processed in a single thread and all the live connections would be lost if it got crashed (though its easy to restart). 3) What are the advantages of event based programming compared to thread based style ? or vice-versa. (I know of higher cost associated with thread switching but hardware can be squeezed with event model.) Following are interesting but contradicting (to some extent) papers:- 1) http://www.usenix.org/events/hotos03/tech/full_papers/vonbehren/vonbehren_html 2) http://pdos.csail.mit.edu/~rtm/papers/dabek:event.pdf

    Read the article

  • Event firing sequence for a submit button.

    - by JSTyro
    Say a submit button has a click event handler as well (yes, it's wrong, but that's really the code I'm working on). And the click handler sets a value in a field of the form that's about to be submitted. So when the submit button is clicked: What will fire first, the form submit event or the click event? Will the value set in the form field by the click event submitted to the server? I think this depends on the answer to Q1. If the form is posted first, I'm guessing it won't. Note: I'm not looking for alternatives and advice. I know what the proper way of handling this will be. Just trying to understand the sequence of events and their implications.

    Read the article

  • re-trigger the same tab index event

    - by hunt
    Hi, i am using Jquery UI tabs , to trigger show event i use following statement $tabs.tabs('select',1); after this code executes a tab is set to #tabs-1 but i am failed to re trigger the same event on same tab when #tabs-1 is already shown. so how to re-trigger the same tab event.

    Read the article

  • how to avoid jQuery UI draggable from also triggering click event

    - by James Tauber
    A have a large div (a map) that is draggable via jQuery UI draggable. The div has child divs which are clickable. My problem is that if you drag the map, on mouse up, the click event is fired on whatever child div you started the drag from. How do I stop the mouse up from triggering the click event if its part of a drag (as opposed to someone just clicking without a drag, in which case the click event is desired).

    Read the article

  • Registering an event from different thread

    - by ET
    Hi, I have a question regarding events in c#. Lets say I have an object obj1 of a class that exposes an event, and this object is running on thread t1. Now on different thread t2, there is another object called obj2 that is registered for the event of obj1. Is it promised that obj2 will get the event when it will be raised? thanks.

    Read the article

  • jquery element click event only allowed once? confuddled

    - by claw
    One a click event of an element, it only works once. Say the value is 2 it will increase/decrease/reset only once. How to I reset the event so the user can keep clicking on the element increasing the value of the value .item-selection-amount $('.item-selection-amount').click(function(event) { var amount = $(this).val(); switch (event.which) { case 1: //set new value + $(this).val(amount + 1); break; case 2: //set new value reset $(this).val(0); break; case 3: //set new value - if(amount > 0){ $(this).val(amount - 1); } break; } }); Thanks

    Read the article

  • onKeypress Enter Key event on textfield not working in Chrome

    - by rlcrews
    I have a question along the same vein as the one asked here regarding how the enter key is handled in chrome. The effect I am trying to accomplish is to allow the enter key to call a click event of one a button while focus in within the current field. To accomplish this I am using the following code: javascript: <script type="text/javascript"> //attempting to capture keypress for chrome here but this is not working $("#txtContainer").keypress(function (e) { if (e.keyCode == '13') { e.preventDefault(); doClick(buttonname, e); return false; } }); function doClick(buttonName, e) { var key; if (window.event) key = window.event.keyCode; //IE else key = e.which; //firefox if (key == 13) { var btn = document.getElementById(buttonName); if (btn != null) { btn.click(); event.keyCode = 0 } } } </script> within the aspx <form id="form1" runat="server"> <div> <asp:LinkButton ID="newBtn" runat="server" OnClick="btnLogin_Click" Text="ASP Link" /> <asp:TextBox ID="txtContainer" runat="server" Width="100" /> <asp:Label ID="time_lbl" runat="server" /> </div> </form> and within the code behind aspx.cs protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { txtContainer.Attributes.Add("onKeyPress", "doClick('" + newBtn.ClientID + "',event)"); } } public void btnLogin_Click(object sender, EventArgs e) { time_lbl.Text = txtContainer.Text; } The above code works fine in FF and IE however chrome continues to submit the entire form vs. capturing the keypress on the enterkey. Thank you for any suggestions.

    Read the article

  • jQuery - Programmatically Trigger Event

    - by Sonny
    I need to programmatically trigger a click event that's being handled by jQuery. Here's the current code: var $thumbs = $('#PhotoGalleryThumbs .tile'); var $zoom = $('#PhotoGallery #PhotoGalleryZoom img'); var $description = $('#PhotoGallery #PhotoGalleryDescription'); $thumbs.click(function(event) { event.preventDefault(); var $thumb = $(this); $thumb.addClass('selected') .siblings().removeClass('selected'); $zoom.attr('src', $thumb.children('a').attr('href')); $description.html($thumb.find('img').attr('alt')); }); I am having a mental block working out how to create a function out of the event handling code and then arbitrarily calling it for an element in the $thumbs object.

    Read the article

  • Event-based interaction between two custom classes

    - by Antenka
    Hello everybody. I have such problem: I have 2 custom components, which have their own nesting hierarchy ... One is container for another. I have to "familiarize them" with each other. The way I'm trying to achieve that is using global events (one side is firing and the other one is catching): Application.application.addEventListener("Hello", function (data:Event):void{ // .. some actions }); //and Application.application.dispatchEvent(new Event(Hello)); Everything is pretty good, but there's one thingy .. when I'm trying to catch the event, I can't access the class, who is catching it. E.g.: Container fires the event. Child caughts it. Then should be created the connection between container and it's child. BUT, the only thing I could acheive is passing a reference to the Container in the DynamicEvent. Is there any chance that I could access the child at the event-handler function. Or maybe there's more elegant way to solve this problem ... Any help would be greately appreciated :)

    Read the article

  • ActionScripting Issue: adding/removing children

    - by user1890698
    I have three movie clips all linked to the stage and I want them to behave like a button/ But I am not using a button because I have not found a way to have each part (up, over, down, hit) be animated and not just change when the mouse is in use with it. So far I have been able to have all three appear on my stage and show when I have the mouse over and as well when I click, but I think I'm doing something wrong with removeChild. Each MC should appear one at a time and now all three show up when I hover over and seem to "flash". Here's my code: var mainMoon:swayingMoon = new swayingMoon(); mainMoon.x = 50; mainMoon.y = 10; addChild(mainMoon); var hoverMoon:glowMoon = new glowMoon(); hoverMoon.x = 50; hoverMoon.y = 10; var movieMoon:clickedMoon = new clickedMoon(); movieMoon.x = 50; movieMoon.y = 10; mainMoon.addEventListener(MouseEvent.ROLL_OVER, showHoverMoon); mainMoon.addEventListener(MouseEvent.ROLL_OUT, hideHoverMoon); hoverMoon.addEventListener(MouseEvent.CLICK, startMovieMoon) function showHoverMoon(event:MouseEvent):void { addChild(hoverMoon); } function hideHoverMoon(event:MouseEvent):void { removeChild(hoverMoon) } function startMovieMoon(event:MouseEvent):void { addChild(movieMoon); }

    Read the article

  • Mootools event leak

    - by user572263
    The example to demonstrate the issue can be found here: link text The test shows a basic Mootools class that contains an element variable with a click event attached. There’s also a “cleanup” function to remove the event and nullify the element variable. My problem is that when I loop a thousand times to create the “LeakClass” instance and clean it up, it causes a major memory leak like there’s no tomorrow. I tested this on IE8 and Chrome. On the other hand what I’ve noticed is that if I comment out the line that adds the “click” event, the code doesn’t leak. Can somebody please help me structure the class/event in a manner that it doesn’t leak. Thanks in advance.

    Read the article

  • jQuery trigger custom event synchronously?

    - by Miguel Angelo
    I am using the jQuery trigger method to call an event... but it behaves inconsistently. Sometimes it call the event, sometimes it does not. <a href="#" onclick=" $(this).trigger('custom-event'); window.location.href = 'url'; return false; ">text</a> The custom-event has lots of listeners added to it. It is as if the trigger method is not synchronous, allowing the window.location.href be changed before executing the events. And when window.location.href is changed a navigation occurs, interrupting everything. How can I trigger events synchronously? Using jQuery 1.8.1. Thanks! EDIT I have found that the event, when called has a stack trace like this: jQuery.fx.tick (jquery-1.8.1.js:9021) tick (jquery-1.8.1.js:8499) jQuery.Callbacks.self.fireWith (jquery-1.8.1.js:1082) jQuery.Callbacks.fire (jquery-1.8.1.js:974) jQuery.speed.opt.complete (jquery-1.8.1.js:8991) $.customEvent (myfile.js:28) This proves that jQuery trigger method is asynchronous. Oohhh my... =\

    Read the article

  • How do I add events to nested server controls? (ASP.Net)

    - by bert
    I am building a custom master page type control i.e. sort of like a datagrid but should be easier to add custom functionality into it. It's going great but part of the desired functionality is to have a paging control that switches on and off and part of that control would be a textbox that displays the current page number and on TextChanged redirects to the new page of the dataset. The problem I'm having is that technically the textbox which has its event fired is embedded in a control that is embedded in the control you actually put on the page sort of like Page  | Display Control  | Paging Control  | Textbox Buried all the way down there the event is not firing. Worse the postback javascript isn't even being written onto the page (Nothing on the page posts back so far this is the only bit that really needs to). I've been trawling around Google for quite a while now and picked up that I need to implement INamingContainer (done) and I need to add the control into the page's control tree (is Pre_Init too late for that? When's a good time to Add the Control to the page?) then the event should fire, apparently. But I've been unable to find an example of best practice on this there are quite a few near misses where people are having button angst but this isn't a button. So can anyone point me in the direction of getting a control embedded in a control embedded in a control added to a page to behave properly?

    Read the article

  • GeoCoordinateWatcher doesnt fire the event at given intervals

    - by krrishna
    I have the below code which fires the GeoCoordinateWatcher PositionChanged event for every 0.5 meteres .It might be less.But thats my requirement. The issue is when i am walking with phone doesnt fire the event at every 0.5 meters instead it fires the event after 0.5 meters randomly.And sometimes when i move fast it fires few events one after another immediately. Can anybody help me with how to ensure it fires the positionchanged event for every 0.5 meters accurately . watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Default); if (watcher.Permission == GeoPositionPermission.Granted) { watcher.MovementThreshold = 0.5;//in meters } watcher.PositionChanged += new EventHandler<GeoPositionChangedEventArgs<GeoCoordinate>>(watcher_PositionChanged); // PositionChanged events occur whenever your position changes watcher.StatusChanged += new EventHandler<GeoPositionStatusChangedEventArgs>(watcher_OnStatusChanged); watcher.Start();

    Read the article

  • c# event and delegate question

    - by user359562
    I want to detach the custom event but could not detach. Please find below I am using -= to detach the event. I assume after this, TextChanged2 method should not be invoked as I have unregistered the event. Let me know if my understanding is wrong. public delegate void TextChangedEventHandler1(object sender, TextBoxargs ta); public event TextChangedEventHandler1 TextChanged1; private void textBox1_TextChanged(object sender, EventArgs e) { this.TextChanged1 -= new TextChangedEventHandler1(TextChanged2); TextChanged2(sender, e); } public void TextChanged2(object sender, EventArgs e) { textBox1.Text = textBox1.Text.ToUpper(); }

    Read the article

  • poll(2) doesn't empty the event queue

    - by sasayins
    Hi, Im using linux as my programming platform. I am using poll(2) to know if my device is triggering an event. The first call of poll is ok, it blocks and wait for the event to happen. But in the second poll function call, it will return but it capture the event. Below are my code ret = poll( fds, 1, 2000); //2 secs timeout if( fds[0].revents & POLLIN && ret > 0) { printf("event occur\n"); } It seems the queue/buffer is not empty, im just assuming. What do you think is the problem? Thanks.

    Read the article

  • Why isn't this working - using :not() with an event handler

    - by james emanon
    I seem to have another issue that I am not conquering. Real simple premise. I have a mousedown event, and basically IF one particular element on the page is clicked, I want nothing to happen, else I want hide() some div. $(function(){ $("document :not(#_ignorelement)").mousedown(function(event){ if($('#_hidethiselement').length){ $('#_hidethiselement').hide(); } }) }) That is not working at all. I also tried the following: $(document).not($("#_ignorelement")).mousedown(function(event){ $(document).not("_ignorelement").mousedown(function(event){ IF I can solve that, curious how I would actually have ":not" encompass the parent div, like so: $().not("_ignoreelement").parent().closest('div').mousedown(function Because the element "_ignorelement" is an anchor tag that is in a div. Wonder how I can use the parent div perhaps, instead of the anchor tag. Anyways, any help would be appreciated.

    Read the article

  • System Account Logon Failures ever 30 seconds

    - by floyd
    We have two Windows 2008 R2 SP1 servers running in a SQL failover cluster. On one of them we are getting the following events in the security log every 30 seconds. The parts that are blank are actually blank. Has anyone seen similar issues, or assist in tracking down the cause of these events? No other event logs show anything relevant that I can tell. Log Name: Security Source: Microsoft-Windows-Security-Auditing Date: 10/17/2012 10:02:04 PM Event ID: 4625 Task Category: Logon Level: Information Keywords: Audit Failure User: N/A Computer: SERVERNAME.domainname.local Description: An account failed to log on. Subject: Security ID: SYSTEM Account Name: SERVERNAME$ Account Domain: DOMAINNAME Logon ID: 0x3e7 Logon Type: 3 Account For Which Logon Failed: Security ID: NULL SID Account Name: Account Domain: Failure Information: Failure Reason: Unknown user name or bad password. Status: 0xc000006d Sub Status: 0xc0000064 Process Information: Caller Process ID: 0x238 Caller Process Name: C:\Windows\System32\lsass.exe Network Information: Workstation Name: SERVERNAME Source Network Address: - Source Port: - Detailed Authentication Information: Logon Process: Schannel Authentication Package: Kerberos Transited Services: - Package Name (NTLM only): - Key Length: 0 Second event which follows every one of the above events Log Name: Security Source: Microsoft-Windows-Security-Auditing Date: 10/17/2012 10:02:04 PM Event ID: 4625 Task Category: Logon Level: Information Keywords: Audit Failure User: N/A Computer: SERVERNAME.domainname.local Description: An account failed to log on. Subject: Security ID: NULL SID Account Name: - Account Domain: - Logon ID: 0x0 Logon Type: 3 Account For Which Logon Failed: Security ID: NULL SID Account Name: Account Domain: Failure Information: Failure Reason: An Error occured during Logon. Status: 0xc000006d Sub Status: 0x80090325 Process Information: Caller Process ID: 0x0 Caller Process Name: - Network Information: Workstation Name: - Source Network Address: - Source Port: - Detailed Authentication Information: Logon Process: Schannel Authentication Package: Microsoft Unified Security Protocol Provider Transited Services: - Package Name (NTLM only): - Key Length: 0 EDIT UPDATE: I have a bit more information to add. I installed Network Monitor on this machine and did a filter for Kerberos traffic and found the following which corresponds to the timestamps in the security audit log. A Kerberos AS_Request Cname: CN=SQLInstanceName Realm:domain.local Sname krbtgt/domain.local Reply from DC: KRB_ERROR: KDC_ERR_C_PRINCIPAL_UNKOWN I then checked the security audit logs of the DC which responded and found the following: A Kerberos authentication ticket (TGT) was requested. Account Information: Account Name: X509N:<S>CN=SQLInstanceName Supplied Realm Name: domain.local User ID: NULL SID Service Information: Service Name: krbtgt/domain.local Service ID: NULL SID Network Information: Client Address: ::ffff:10.240.42.101 Client Port: 58207 Additional Information: Ticket Options: 0x40810010 Result Code: 0x6 Ticket Encryption Type: 0xffffffff Pre-Authentication Type: - Certificate Information: Certificate Issuer Name: Certificate Serial Number: Certificate Thumbprint: So appears to be related to a certificate installed on the SQL machine, still dont have any clue why or whats wrong with said certificate. It's not expired etc.

    Read the article

  • Windows Software RAID 5 Drive Failure Notification

    - by Wayne Hartman
    I plan on creating a Windows software RAID 5 array but need to know when a drive goes bum. I don't plan on wanting to check the server every so often, so how can I have an email sent when a drive goes kapüt or otherwise has problems? Keying off the event log would be OK, but how does one set up notifications on it when the exact event ID(s) may not be known?

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >