Search Results

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

Page 81/1134 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • Find the right parameters for an event without using Design Mode in Visual Studio 2010

    - by Jason
    Is there a way to know what parameters are needed by an event in Visual Studio 2010? Let's say I have a DropDownList control and I want to bind a method to the "OnSelectedIndexChanged", I would do something like this In the ASPX File: <asp:DropDownList ID="lstMyList" runat="server" OnSelectedIndexChanged="lstMyList_SelectedIndexChanged"></asp:DropDownList> In the codebehind: protected void lstMyList_SelectedIndexChanged(object sender, EventArgs e) { ... } Is there a way to know what parameters the method needs? (In this case, an object for the sender and an EventArgs parameter for the event.) I know you can easily create the method by double-clicking the right event in Design Mode, but it does a mess with your code so I prefer not to use it. Thanks!

    Read the article

  • Guaranteeing the onmouseout event to fire

    - by n3rd
    Hello everybody, I'm currently developing a web application and have run into a little problem. I'm using ExtJS, but I believe this to be a general JS question. When the cursor enters an HTML element, the onmouseover event is fired, when the cursor leaves that element, onmouseout is triggered. So far, so good. Unfortunately, it seems one can't fully rely on this behaviour. Very quick mouse movements can cause the event not to fire (as does repositioning the cursor with a pen tablet, for example). What are the best practices to handle these issues? Do I need to monitor all onmousemove events and manually keep track of where the cursor was last and fire the appropriate onmouseout event myself?

    Read the article

  • JSTree select_node event and checkbox

    - by Ted Mosbey
    Hi there! I have a jstree in which I used the select_node event to toggle nodes(expand), and have therefore removed the toggle arrows in the tree since they look ugly and I've no need for them. Now I've added the checkbox plugin to use within the tree, but have found the select_node event is disabled when the plugin is active. How would I toggle my nodes with the checkbox plugin active, without re-adding the ugly toggle arrows? I could do it in the check/uncheck event, but I don't want to check/uncheck everytime I expand a node.

    Read the article

  • Removing DOM event handlers in long-running browser session

    - by Chris Beck
    I have a browser interface with a ul#contacts list on the left and div#contact property panel (email, phone) on the right. Click a contact in the list and my app makes an XHR request to get the contact property HTML fragment and update div#contact.innerHTML. Each contact fragment has an "Edit Contact" link. With JS, I progressively upgrade that link with an event listener that performs an XHR request to replace the static property panel with an in-place edit form. This can happen many times during a single browser session. How should I clean up my "Edit Contact" event listener? Do I need to remove it manually before the form overwrites the property panel? Or is the event listener cleaned up automatically when the contents of div#contact (and the node that I'm listening on) is overwritten? FWIW, I still consider IE6 to be part of my target market.

    Read the article

  • Testing whether an event has happened after a period of time in jQuery

    - by chrism
    I'm writing a script for a form-faces xforms product that is keyed off an event built into form faces. The event is called 'xforms-ready'. I have define 'startTime' as happening as soon as the document in 'ready'. What I want the script to do is warn the user that it is taking too long before the 'xforms-ready' happens, say if it's been 6 seconds since 'startTime'. I can easily do things when the 'xforms-ready' event happens using the code below: new EventListener(document.documentElement, "xforms-ready", "default", function() { var endTime = (new Date()).getTime(); } ); however the warning will want to happen before 'endTime' is defined. So I guess I want something that works like this: If 6 seconds has passed since startTime and endTime is not yet defined do X or possibly more efficiently: If 6 seconds has passed since startTime and 'xforms-ready' has not yet happened do X Can anyone suggest a way of doing this?

    Read the article

  • How do I trigger a single event defined for a class of objects

    - by mrbinky3000
    I have a question. I have 8 buttons that have unique incrementing id's and a shared class. <button class="btnChapter" id="btnChapter_1" value="1">1</button> <button class="btnChapter" id="btnChapter_2" value="2">2</button> <button class="btnChapter" id="btnChapter_3" value="3">3</button> ... In order to prevent me from duplicating code, I bound a click event to the btnChapter class instead of binding an event individually to each button's ID. $('.btnChapter').click(function(){ .. do stuff .. }); How do I trigger() the click() event only for #btnChapter_2? The following doesn't seem to work. $('#btnChapter_2').click()

    Read the article

  • MYSQL Event Scheduler DELIMITER using PHP

    - by user1440918
    I'm having an issue with my PHP code trying to create events within MySQL. I begin with creating a string like this: $sql="DELIMITER $$ CREATE EVENT `$test_name` ON SCHEDULE EVERY $time1 $sched2 STARTS '$start_date $start_time' DO BEGIN "; $sql .="INSERT INTO blah (foo,bar); "; $sql .="END$$ DELIMITER ;" mysql_query($sql,$dbh); But I keep getting Syntax Errors starting with DELIMITER $$ CREATE EVENT. Without the semicolon behind (foo,bar); the event triggers with a unexecuted payload. Any ideas on where I'm going wrong? Thanks!

    Read the article

  • How to pass around event as parameter in c#

    - by Jerry Liu
    Am writing unit test for a multi-threading application, where I need to wait until a specific event triggered so that I know the asyn operation is done. E.g. When I call repository.add(something), I wait for event AfterChange before doing any assertion. So I write a util function to do that. public static void SyncAction(EventHandler event_, Action action_) { var signal = new object(); EventHandler callback = null; callback = new EventHandler((s, e) => { lock (signal) { Monitor.Pulse(signal); } event_ -= callback; }); event_ += callback; lock (signal) { action_(); Assert.IsTrue(Monitor.Wait(signal, 10000)); } } However, the compiler prevents from passing event out of the class. Is there a way to achieve that?

    Read the article

  • Click event of buttons is not fired when it causes onChange event of textbox is fired first

    - by bakkujp
    Hi All, I have a textbox like below <h:inputText value="#{bean.strQuantite}"> <a4j:support actionListener="#{tabacListCommandeAltadisDetailBean.actionListenerQuantity}" event="onchange" /> </h:inputText> I input some value into the textbox above and keep the caret inside the textbox. After that, when I continue to click a other button, the event onchange of the input text above is fired. I want to when clicking the button, the click event is fired before. Can anyone help me to solve this problem ?

    Read the article

  • to avoid page refresh during button click event in asp.net

    - by ush
    public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) // If page loads for first time { Session["update"] = Server.UrlEncode(System.DateTime.Now.ToString()); // Assign the Session["update"] with unique value //=============== Page load code ========================= //============== End of Page load code =================== } } protected void Button1_Click(object sender, EventArgs e) { if (Session["update"].ToString() == ViewState["update"].ToString()) // If page not Refreshed { //=============== On click event code ========================= Label1.Text = TextBox1.Text; //lblDisplayAddedName.Text = txtName.Text; //=============== End of On click event code ================== // After the event/ method, again update the session Session["update"] = Server.UrlEncode(System.DateTime.Now.ToString()); } else // If Page Refreshed { // Do nothing } } protected override void OnPreRender(EventArgs e) { ViewState["update"] = Session["update"]; } } this is not working for high resolution gradient background

    Read the article

  • DataGridView and the CellEndEdit Event

    - by Brandon
    I have a DataGridView, and would like to hook into the CellEndEdit event. I've been able to successfully hook into the CellContentClick event, but am having issues with CellEndEdit. I added the following code to my Form1.cs file: private void dataGridView1_CellEndEdit(object sender, DataGridViewCellCancelEventArgs e) { dataGridView1[0, 0].Value = "Changed"; } With that code, nothing happens when I am done editing a cell. Is there anything else that I need to do to successfully hook into this event? I see that CellContentClick has a this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); line of code in the Form1.Designer.cs file, but I tried to mimic this for CellEndEdit, and received a compile error (No overload for 'dataGridView1_CellEndEdit' matches delegate 'System.Windows.Forms.DataGridViewCellEventHandler')

    Read the article

  • Intercept click event on a button, ask for confirmation, then proceed

    - by Blankman
    Based on a variable SomeCondition, I need to intercept a click event on a button, and ask for confirmation, if they say ok, proceed, otherwise ignore click. So something like: if(SomeCondition) { // disable click on button var isOk = window.confirm("Are you sure?"); if(isOk) { $("#button1").click(); } } Note: button1 has already been wired up with a click event via javascript from an external .js file that I can't change. I don't know what the click event was bound too, so I have to disable the click if SomeCondition is true, then ask for confirmation, then continue with the click.

    Read the article

  • jQuery and the mouseover event

    - by Kingston
    I need to know how to fix this problem. I have a mouseleave event on my list. jQuery(".list").live("mouseleave", function(event) { alert("Boom"); }); But at the same time I have a tooltip displayed over it. This tooltip doesn't belong to this list, it is in other div. Now, when i move mouse over that div, i get an alert - i left the list. Please, tell me how i can do that when i move mouse in this tooltip, there will be no action. I've tried this sentence, but it doesn't work: if($(event.target).hasClass('name')) alert("D");

    Read the article

  • dojo TimeTextBox don't listen to on blur event

    - by kawtousse
    Hi everyone, I want to add an on blur event to a dojo timetextbox but the event never been runned so the declaration of the timetextbox is like this: <label>End</label><input id="endp" name="endp" onBlur="calculateTimeSpent2(startp,endp,output);" /> the javascript function is like this: function calculateTimeSpent2(startp,endp,outputp) { var tmp0=document.getElementById('startp').value.split(':'); var tmp1=document.getElementById('endp').value.split(':'); if (tmp0[0]!='' && tmp1[0]!='') { var val1= findtime(tmp0[0],tmp0[1],tmp1[0],tmp1[1]); var tmp=val1.split(':'); if (tmp[0].indexOf('-')==-1) document.getElementById('outputp').value=val1; else { alert ("Start Time must be lower than End Time "); document.getElementById('endp').focus(); } } } I don't understand why dojo didn't execute the event correctly while loosing the focus. I tried to put the type=text but it does'nt work. Thanks for help.

    Read the article

  • Event is causing an error, but I can't catch the exception

    - by proudgeekdad
    A developer has created a custom control in ASP.NET using VB.NET. The custom control uses a repeater. In certain scenarios, the rpt_ItemDataBound event is encountering a data error. My goal is rather than having the user see the yellow screen of death, give the user a friendlier error explaining exactly what the data error is. I figured I would be able to use a Try/Catch block as shown below throw the exception, however, it appears that the event has nowhere to be thrown to and stops executing at the "End Try" line. Protected Sub rpt_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rpt1.ItemDataBound, rpt2.ItemDataBound Try ProcessBadData... Catch ex As Exception Throw ex End Try End Sub In VB.NET, I can find where the repeater's DataSource is being set, however, I can not find a DataBind event. Any ideas how I can capture the exception in this ASCX control so I can report it to the user?

    Read the article

  • Detecting support for a given JavaScript event?

    - by Will
    I'm interested in using the JavaScript hashchange event to monitor changes in the URL's fragment identifier. I'm aware of Really Simple History and the jQuery plugins for this. However, I've reached the conclusion that in my particular project it's not really worth the added overhead of another JS file. What I would like to do instead is take the "progressive enhancement" route. That is, I want to test whether the hashchange event is supported by the visitor's browser, and write my code to use it if it's available, as an enhancement rather than a core feature. IE 8, Firefox 3.6, and Chrome 4.1.249 support it, and that accounts for about 20% of my site's traffic. So, uh ... is there some way to test whether a browser supports a particular event? Thanks.

    Read the article

  • Click event of a button which is subview of an image view in xcode

    - by Christina
    in my app i have an image view and above that i added an button.And also in button click event i am calling a method.But i am unable to click on the button .whenever i try to click the button then the row of the table vie win which my image view is present is selected .Is there any method from which i can get the click event of the button which is placed on the image view.I do not want to use UIbuttons for setting the images in place of image view .Also if i am adding button as a subview of the table view then the click event is working but when i change the subview to image view then i get unsatisfactory result.Please help. Thanks, Christy

    Read the article

  • unable to set href inside click event of Jquery

    - by akshatrautela
    Hi I am trying to set href using Jquery inside click event of RadioButtonList but that doesnt work If I take the same code to document.ready event it works fine but not in click event. Please advice. $(document).ready(function() { url = "Results.aspx?latitude=" +latitude + "&Longitude=" + longitude; $("a[href='http://www.google.com/']").attr("href", url); // this works.. } $('.rbl input').click(function() { id = $(this).parent().children("input").val(); url = "Results.aspx?latitude=" + latitude + "&Longitude=" + longitude + "&ServiceCenterProductTypeId=" + id; //alert(url); $("a[href='http://www.google.com/']").attr("href", url); //this doesnt work.... }); });

    Read the article

  • why does calling methods on a div fire the live click event

    - by oo
    i have this jquery code: $(this).parent('.copyFoodInstance').attr("myset", "0"); $(this).parent('.copyFoodInstance').html("<img BORDER=0 src='../../images/copy1.png' />"); it seems that when i call this code, this event fires: $(document).ready(function() { $('div.copyFoodInstance').live('click', function() { does anyone know why this event fires from the lines above? is there anyway to stop if from firing? All i am doing is updating an attribute on the div and updating the html. this shouldn't fire a click event?

    Read the article

  • Event in Global.asax file that fires only for once

    - by fiberOptics
    In MVC Global.asax file, we can see the Application_Start where this event fires only for once. But the session is not yet active/available here. So my question is, is there any event in Global.asax file that fired only for once and session is available also? The reason I ask this is because, I use ExpandoObject e.g.: public static dynamic Data { get { #region FAILSAFE if (HttpContext.Current.Session[datakey] == null) { HttpContext.Current.Session[datakey] = new ExpandoObject(); } #endregion return (ExpandoObject)HttpContext.Current.Session[datakey]; } } I want to initialize all of my ExpandoObject at once with the value of null: MyExpando.Data.UserInformation = null; MyExpando.Data.FolderInformation = null; That's why I'm looking for an event that only fired once.

    Read the article

  • Java vs C# - AddActionListener vs event subscription

    - by S.O.
    Very simple question from one somewhat new to Java: when adding an event handler (or whatever it is called in Java) to a Control, MUST it be an object? I mean, in C# I can do control.event += System.eventHandler(methodThatHandlesEvent) Sure, that's because we have delegate types in C#, but I was wondering if I can choose which method would be called when an event is raised in Java? I mean, in Java I can have something like control.AddActionListener(objectWhichClassImplementsActionListener) And then I have the stupid actionPerformed method in this class, which is the only method that is called. I know, there are more kinds of listeners, but I can't have a "ActionListenerHandler" class in which I implement several actionPerformed methods that can be assigned to different controls?

    Read the article

  • Create empty C# event handlers automatically

    - by TomA
    It is not possible to fire an event in C# that has no handlers attached to it. So before each call it is necessary to check if the event is null. if ( MyEvent != null ) { MyEvent( param1, param2 ); } I would like to keep my code as clean as possible and get rid of those null checks. I don't think it will affect performance very much, at least not in my case. MyEvent( param1, param2 ); Right now I solve this by adding an empty inline handler to each event manually. This is error prone, since I need to remember to do that etc. void Initialize() { MyEvent += new MyEvent( (p1,p2) => { } ); } Is there a way to generate empty handlers for all events of a given class automatically using reflection and some CLR magic?

    Read the article

  • Activiti Engine: Task Event - User is null

    - by sockeqwe
    I have a problem, which should be simple to solve, but i can't find the method to call to solve this problem: My problem is, that every Task Event (org.activiti.engine.task.Event) returnes null by calling Event.getUserId(); If I take a look into the database I see that the database table ACT_HI_COMMENT has null as value for the column USER_ID_ for every row. I generate these TaskEvents programmatically by calling (for example) processEngine.getTaskService().addComment(task.getId(), null, commentMessage); processEngine.getTaskService().addUserIdentityLink(task.getId(), user.getId(), IDENTITY_LINK_OBSERVER); I guess there is a simple method that I must call to solve this problem, something like processEngine.setCurrentUser(authenticatedUser.getId()); Any suggestions?

    Read the article

  • C# - Check which event changed / accessed a Property

    - by binil
    I have a class with property say private string fieldSelectedItem; public string FieldSelectedItem { get { return fieldSelectedItem; } set { fieldSelectedItem = value; } } it is accessed from many place. I came across a situation that the a property in class is accessed by some event. and also some event is changing the value. i tried debugging. is it possible to check which event/function has changed/accessed the property. is there any method to do so.

    Read the article

  • Event click on youtube API

    - by Youss
    I'm working with Youtube API and Jquery. With a certain script I can get Youtube Feeds as an image, take a look at the example: JsFiddle I'm trying to do a Jquery click event which will have to invoke another script called 'embedly' like this: $("a").click(function(event) { event.preventDefault(); $(this).embedly({ chars: 220, nostyle: true, key:':41f042ec20b04dda84448dc4a46d357d' }); }); It doesn't seem to work. When I do this from my desktop the click does not invoke the embedly part and also goes to the url regardless of the prevent default.

    Read the article

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