Search Results

Search found 28345 results on 1134 pages for 'custom event'.

Page 67/1134 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • Create event for another owner using Facebook Graph API

    - by David
    Hi, I'm at the moment working on a web page where the users who visit it should have the possibility to create an event in my web page's name. There is a Page on Facebook for the web page which should be the owner of the user created event. Is this possible? All users are authenticated using Facebook Connect, but since the event won't be created in their name I don't know if that's so much of help. The Python SDK will be used since the event shall be implemented server side. / D

    Read the article

  • mootools event listener disappears after element.innerHTML is changed

    - by baiano
    I putting together a page that will display a set of stored values. I am using mootools and AJAX calls to update the values without needing to refresh the page each time the user selects a new item from the drop down menus. the HTML each line looks something like: <div class="selections"> <input class="checkbox selector" type="checkbox" CHECKED /> <span class="b_name"> <select class="b_n selector"> <!-- options --> </select> </span> <span class="b_level"> <select class="b_l selector"> <!-- options --> </select> </span> <span class="values"> <!-- the values --> </span> In the head I have set up an event listener like: $$('.selector').addEvent('change', function(event){changeValues(this);}); My problem is that when the "b_name" select changes I have to update the list of options in the "b_level" select. I accomplish that by getting a list of the possible options from my database through a php script on another page and replacing "b_level"'s innerHTML. Once I do that, the event listener attached to "b_l selector" no longer works. I tried to resolve this issue by explicitly attaching an event listener to "b_l selector" each time "b_name" changes like so: row.getElement('.b_l').addEvent('change', function(event){changeValues(row.getElement('.b_l'));}); where 'row' is the html element 'div.selections'. It still isn't working and I have no idea what's going on. Can anyone offer a suggestion as to how I can get this resolved? or perhaps a better way to do what I'm doing. Thanks

    Read the article

  • In CQRS (event-sourced), do you need a global sequence counter in the event store?

    - by Jon M
    In trying to get my head around CQRS (and DDD in general) I have come across situations when two events occur on different aggregates but the order of them has domain meaning. If so then they could happen so close together that a timestamp (as used by the sample implementations I have seen) cannot differentiate them, meaning the event store doesn't contain a 'complete' representation of the domain as there is ambiguity over the order in which events occurred. As an example, the domain could fire a CustomerCreatedEvent which applies to the Customer aggregate, and then a CustomerAssignedToAgent event on the Agent aggregate. The CustomerAssignedToAgent event doesn't make sense if it occurs before the CustomerCreatedEvent, but typically both of these might be fired as a result of one operation which makes it likely that the timestamps would effectively be the same. So am I just modelling things badly? Should there ever be a situation where the sequence of events across different aggregates is important? Or should you keep a global sequence number on your event store, so that you can identify the exact sequence in which events occurred?

    Read the article

  • Unit Test Event Handler

    - by Thomas Tran
    I got this event handle and how can I do unit test for this public class MyLearningEvent { private event EventHandler _Closed; public event EventHandler Closed { add { _Closed -= value; _Closed += value; } remove { _Closed -= value; } } public void OnClosed() { if (_Closed != null) _Closed(this, EventArgs.Empty); } } Just modified code so that much clear Thanks

    Read the article

  • WPML is not detecting Wordpress custom post types

    - by janoChen
    I learned how to make custom post types with the following tutorial: http://sixrevisions.com/wordpress/wordpress-custom-post-types-guide/ It basically consist in adding this code to function.php: add_action( 'init', 'create_events' ); function create_events() { $labels = array( 'name' => _x('Events', 'post type general name'), 'singular_name' => _x('Event', 'post type singular name'), 'add_new' => _x('Add New', 'Event'), 'add_new_item' => __('Add New Event'), 'edit_item' => __('Edit Event'), 'new_item' => __('New Event'), 'view_item' => __('View Event'), 'search_items' => __('Search Events'), 'not_found' => __('No Events found'), 'not_found_in_trash' => __('No Events found in Trash'), 'parent_item_colon' => '' ); $supports = array('title', 'editor', 'custom-fields', 'revisions', 'excerpt'); register_post_type( 'event', array( 'labels' => $labels, 'public' => true, 'supports' => $supports ) ); } The WPML plugin help you to translate posts to different langauges. But this option doesn't appear in the custom post types. Any suggestions?

    Read the article

  • Webkit ondrop event while dragging

    - by monmonja
    I'm trying to drag one img and so it fires ondragenter for IE and dragover event for standard browsers, on IE and FF after the user drags it could fire ondrop event however on Webkit based (chrome and safari), i need to cancel or preventDefault() on the dragover event, doing that so will disable the dragging. Any idea on solving this? Thanks

    Read the article

  • 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

  • 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

  • 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

< Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >