Search Results

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

Page 144/782 | < Previous Page | 140 141 142 143 144 145 146 147 148 149 150 151  | Next Page >

  • about onmouseout event.

    - by lazyanno
    as follow codes: <div id="outerBox" style="border:1px solid red;width:300;height:300" onmouseout="alert('out')"> <div id="innerBox" style="border:1px solid blue;width:50;height:50">inner</div> </div> why when i move mouse on the "innerBox", it was trigger alert('out') ? i want mouse out "outerBox" trigger alert('out') only, mouse on "innerBox" don't trigger alert. hot to do this? thanks all :)

    Read the article

  • how to handle onclick event of button inside popup window in android

    - by henna
    In my application i have a button initially on the screen and in onclick of the button ,popup window should open. In the popup window i have an imagebutton , now on click of this button i want to start an activity. The popup window opens but i dont understand how to handle the onclick of the imagebtn inside popup window. In main.xml i have a button and in popup_example.xml i have an imagebutton. Hi my Java code is as follows: final LayoutInflater inflater = (LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); final Button b=(Button)findViewById(R.id.btn); b.setOnClickListener(new OnClickListener() { public void onClick(View v) { PopupWindow pw = new PopupWindow(inflater.inflate(R.layout.popup_example,(ViewGroup)findViewById(R.layout.main))); pw.showAtLocation(v, Gravity.LEFT,0,0); pw.update(8,-70,150,270); //if onclick written here, it gives null pointer exception. ImageButton img=(ImageButton)findViewById(R.id.home); img.setOnClickListener(new OnClickListener() { public void onClick(View v) { Intent..... } }); //if onclick is written here it gives runtime exception. }); and i have two xml layouts.........1)main.xml 2)popup_example.xml main.xml popup_example.xml <ImageButton android:id="@+id/home" android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusable="true" android:src="@drawable/vitalss" android:layout_weight="1" android:background="#8E2323" />

    Read the article

  • calling a function in a click event

    - by KATy
    hi, i ve data in d sql DB using those values i ve to call a function in the system.. data in sql location of func:c:\ namespace:calci class name:arith function name:add parameter 1: 1 parameter 2: 2 now we ve use the values c:\,calci,arith,add,1,2 using this we ve to calculate the result.. thanx..

    Read the article

  • Setting Class-Level Variable to Use Between Event Handlers

    - by lush
    I'm having a hard time understanding why the following code doesn't work. I'm sure it's something remedial that I'm missing or not understanding. I currently have a page that asks for user input. If, based on the input and logged in user, I find data from this page already in the database, I need to update the existing records rather than creating new ones, so I set a class-level bool to true. The problem is, when MyNextButton is clicked, PreviouslySubmitted is still false. So, I'm not sure how to make the value of this variable persist. Any advice is appreciated, thanks. public partial class MyForm : System.Web.UI.Page { private bool previouslySubmitted; protected void Page_Load(object sender, EventArgs e) { MyButton.Click += (o, i) => { q = from a in db.TableA where (a.SomeField == SomeValue) select a; if(q.Any()) { PreviouslySubmitted = true; //populate the form's fields with values from database for user to revise } } MyNextButton.Click += (o, i) => { if(PreviouslySubmitted) { //update database } else { //insert into database } }

    Read the article

  • Before after select event validation and results with jquery

    - by richbyte
    I am using a javascript function (F) (jquery )which uses 3 select values selected by the user to calculates a value - R(result) R is a number ranging from (1 through 9), (11) and (22); I need 2 extra steps one before the calculation and one after. a. Before calculation takes place: Make sure all three select values are changed before function(F) takes place. If not prompt the user with a notice ( create dom element/ I am using jquery) b. After the value R is calculated show an element corresponding to the result e.g. if R is 1 show an element ( a predetermined "link" element corresponding to each result value) thanks a lot.

    Read the article

  • Make process run on non EDT (event dispatch thread) thread from EDT

    - by Aly
    I have a method running on the EDT and within that I want to make it execute something on a new (non EDT) thread. My current code is follows: @Override public void actionPerformed(ActionEvent arg0) { //gathering parameters from GUI //below code I want to run in new Thread and then kill this thread/(close the JFrame) new GameInitializer(userName, player, Constants.BLIND_STRUCTURE_FILES.get(blindStructure), handState); }

    Read the article

  • Why are my event listeners firing more than once?

    - by Arms
    In my Flash project I have a movieclip that has 2 keyframes. Both frames contain 1 movieclip each. frame 1 - Landing frame 2 - Game The flow of the application is simple: User arrives on landing page (frame 1) User clicks "start game" button User is brought to the game page (frame 2) When the game is over, the user can press a "play again" button which brings them back to step 1 Both Landing and Game movieclips are linked to separate classes that define event listeners. The problem is that when I end up back at step 1 after playing the game, the Game event listeners fire twice for their respective event. And if I go through the process a third time, the event listeners fire three times for every event. This keeps happening, so if I loop through the application flow 7 times, the event listeners fire seven times. I don't understand why this is happening because on frame 1, the Game movieclip (and I would assume its related class instance) does not exist - but I'm clearly missing something here. I've run into this problem in other projects too, and tried fixing it by first checking if the event listeners existed and only defining them if they didn't, but I ended up with unexpected results that didn't really solve the problem. I need to ensure that the event listeners only fire once. Any advice & insight would be greatly appreciated, thanks!

    Read the article

  • Reference the oncomplete event by an external java script function

    - by user339637
    Hi , I want to do some logic at the oncomplete attribute of the a4j:commandButton ,but my logic is too complicated , can I reference the code using a java script functions located in a external java-script file to have a better maintenance ? I found it has error because the JavaScript file cannot understand the EL expression . For example , originally I have , <a4j:commandButton id="btn1" action="#{MBena1.action1}" oncomplete="if( {MBena1.variable1}){Richfaces.showModalPanel('modelPanel1');};if (......) then "> I want to do something like this: <a4j:commandButton action="#{MBena1.action1}" oncomplete="Btn1OnComplete();"> the code is put inside the java script function Btn1OnComplete() which is located in a external java-script file. Thanks

    Read the article

  • Href link with OnClick event

    - by Aruna
    Hi, i am having a link like below where on click of that twitter , i need to open the twitter page with the message given in $markme_ddesc but instead when i click on the link , it simply moves to twitter.com without opening in a new window and with the message.. Why so? how to resolve this?? Please help me..

    Read the article

  • Onclick event; If and Else

    - by Kyle Gagnon
    All right so I am doing a javascript code for a login type form and it will lead you to a new page. Here it is: function submit1() { var x=document.getElementById("username"); var y=document.getElementById("password"); if (x.value=="username" && y.value=="password") { window.location="Example.php"; } else { window.alert=("The information you have submitted is incorrect and needs to be submitted again!"); } } When ever I am hitting the submit button it takes me straight to the page instead of checking to see if it right. Please help! Thank you in advanced! To let you know this is not a permanet login page!

    Read the article

  • How to override event on a UserControl

    - by Vadim
    Hello! I have a WinForms application (OwnerForm) with some UserControl. When textbox of UserControl is changed, I want to filter content of a OwnerForm. But how can I make it? I don't want to specify OwnerForm inside the user control. I know a solution to add manually handlers for MyUserControl.tb.TextChanged to some functions on a owner form, but I think it's bad way. I'll prefer to have overridable functions, but I can't imagine how to do it. Any suggestions? Thanks in advance,

    Read the article

  • jQuery click event on image only fires once

    - by stephenreece@
    I created a view of thumbnails. When the user clicks, I want the real image to pop-up in a dialog. That works the first time, but once the jQuery 'click' fires on an thumbnail it never fires again unless I reload the entire page. I've tried rebinding the click events on the dialog close that that does not help. Here is my code: function LoadGalleryView() { $('img.gallery').each(function(){ BindImage($(this)); }); } function BindImage(image) { var src= image.attr('src'); var id= image.attr('id'); var popurl = src.replace("thumbs/", ""); image.hover(function(){ image.attr('style', 'height: 100%; width: 100%;'); }, function(){ image.removeAttr('style'); }); $('#'+id).live('click', function() { PopUpImage(popurl); }); } function CheckImage(img,html) { if ( img.complete ) { $('#galleryProgress').html(''); var imgwidth = img.width+35; var imgheight = img.height+65; $('<div id="viewImage" title="View"></div>').html(html).dialog( { bgiframe: true, autoOpen: true, modal: true, width: imgwidth, height: imgheight, position: 'center', closeOnEscape: true }); } else { $('#galleryProgress').html('<img src="images/ajax-loader.gif" /><br /><br />'); setTimeout(function(){CheckImage(img,html);},10); } } function PopUpImage(url) { var html = '<img src="'+url+'" />'; var img = new Image(); img.src = url; if ( ! img.complete ) { setTimeout(function(){CheckImage(img,html);},10); } } PopUpImage() only executes the first time an image is clicked and I cannot figure out how to rebind.

    Read the article

  • Creating an event-invite using the Old Rest Api

    - by Sven Koluem
    Hi, because there is no way doing it with the GraphApi, i try to do it with the old REST Api, but without any success.. no error msg. but also no invite. $restApi = $facebook->api(array( 'method' => 'events.invite', 'eid' => $eid, 'uids' => $testuserId, 'personal_message' => 'testing', 'access_token' => $accesstoken, )); print '<pre>' . print_r($restApi, true) . '</pre>'; Or maybe some of you, knowing a better way.. thx sven

    Read the article

  • Event handler triggered twice instead of once

    - by kwokwai
    Hi all, I am sorry that I have asked two questions in a few minutes. In a html file, I got three child DIV tags in a parent DIV tag: <div id="container"> <div id="frag-123">123</div> <div id="frag-124">124</div> <div id="frag-125">125</div> </div> Now when I click either the three child DIV tags, I will see two alert boxes pop up instead of one: The first alert box will show something like this: frag-123, and the second alert box will show something like this: container I dont know why. I just want to get the ID value of a child DIV, not the one from the parent DIV. <script> $(function() { $("div").click(function() { var imgID = this.id; alert(imgID); }); }); </script> Please help.

    Read the article

  • Changing function parameters for onkeypress event according to source id

    - by DarRay
    I want to assign a function according to their id to all the input fields in a webpage. To do i wrote below code but all the input fields are running keyPress with same parameter.. :( ///////////////////Checks all available 'text' 'input's//////////////////// var inputs = document.getElementsByTagName('input'); var cnvtrInput = new Array(); for (var index = 0; index < inputs.length; index++) { if (inputs[index].type == 'text') { cnvtrInput[index] = new converter(inputs[index]); inputs[index].onkeypress = function() {return keyPess(cnvtrInput[index])}; } } //index--; With the last commented statement i found that the passing element of keyPress is the last value of index; Finally i tried same with textareas but failed...

    Read the article

  • Access the next button event android

    - by Sephy
    I don't know if it's very clear, but i'm trying to do something when the "next" (bottom right corner of the keyboard) is pressed, and i can't find its keycode. I have tried to look for "next" or "enter" in the keycodes but nothing really relevant... does anyone know? (actually, i've found the enter keycode to be precise, but it does not do anything)

    Read the article

  • How to reenable event.preventDefault?

    - by Richbits
    I have a web page which I have prevented the default action on all submit buttons, however I would like to re-enable default submit action on a button how can I do this? I am currently preventing the default action using the following: $("form").bind("submit", function(e){ e.preventDefault(); }); I have successfully done this using the following: $(document).ready(function(){ $("form:not('#press')").bind("submit", function(e){ e.preventDefault(); }); But can I do this dynamically when the button is clicked?

    Read the article

  • How to get right values from Views touch event

    - by Pinker
    I have a problem with implementing touch events on GLSurfaceView. Views size is 1280x696, because of android (tablet) status bar at bottom with soft keys, time etc.., (screen resolution is 1280x800), but OnTouchListener is receiving touch events with coords [646.0,739.0], and thus my gluunproject method fails to return correct values is there any way to return events that respect these boundaries? or how should I recalculate the position?

    Read the article

  • swing: event listener support class

    - by Jason S
    Is there any preexisting class that helps support add/remove EventListener operations? (kind of like PropertyChangeSupport) I'm trying to partition my code into a model and view in Java. I have some data that arrives erratically, and would like the model to support some kind of EventListener so that a view can subscribe to changes in the model. The data is numerous + complicated enough that I don't want to have to do the whole fine-grained Javabeans property change support; rather I would just like to allow notification that the model has changed in a coarse way. how can I best do this?

    Read the article

  • Performance Overhead of Perf Event Subsystem in Linux Kernel

    - by Bo Xiao
    Performance counters for Linux are a new kernel-based subsystem that provide a framework for all things performance analysis. It covers hardware level (CPU/PMU, Performance Monitoring Unit) features and software features (software counters, tracepoints) as well. Since 2.6.33, the kernel provide 'perf_event_create_kernel_counter' kernel api for developers to create kernel counter to collect system runtime information. What I concern most is the performance impact on overall system when tracepoint/ftrace is enabled. There are no docs I can find about them. I was once told that ftrace was implemented by dynamically patching code, will it slow the system dramatically?

    Read the article

  • How do I write sql data into a textbox after a submit type event

    - by Matt
    Finishing up some homework and Im having trouble with figuring out how to take information generated in sql column(a primary key set up to assign a record number to a customer example 1046) at submit and writing it to my redirected recipt page. I call it recipt.aspx. Any takers Professor says to use a datareader...but things go bad after that. public partial class _Default : System.Web.UI.Page { String cnStr = "EDITED FOR THE PURPOSE OF NOT DISPLAYED SQL SERVERta Source=111.11.111.11; uid=xxxxxxx; password=xxxx; database=xxxxxx; "; String insertStr; SqlDataReader reader; SqlConnection myConnection = new SqlConnection(); protected void submitbutton_Click(object sender, EventArgs e) { myConnection.ConnectionString = cnStr; try { //more magic happens as myConnection opens myConnection.Open(); insertStr = "insert into connectAssignment values ('" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + bigtextthing.Text + "','" + DropDownList1.SelectedItem.Value + "')"; //magic happens as Connection string is assigned to connection object and passes in the SQL statment //associate the command to the the myConnection connection object SqlCommand cmd = new SqlCommand(insertStr, myConnection); cmd.ExecuteNonQuery(); Session["passmyvalue1"] = TextBox2.Text; Session["passmyvalue2"] = TextBox3.Text; Session["passmyvalue3"] = TextBox4.Text; Session["passmyvalue4"] = TextBox5.Text; Session["passmyvalue5"] = bigtextthing.Text; Session["I NEED SOME HELP RIGHT HERE"] =Textbox6.Text; Response.Redirect("receipt.aspx"); } catch { bigtextthing.Text = "Error submitting" + "Possible casues: Internet is down,server is down, check your settings!"; } finally { myConnection.Close(); TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; bigtextthing.Text = ""; } //reset validators? } The recipt page public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if(Session["passmyvalue1"] != null) { TextBox1.Text = (string)Session["passmyvalue1"]; TextBox2.Text = (string)Session["passmyvalue2"]; TextBox3.Text = (string)Session["passmyvalue3"]; TextBox4.Text = (string)Session["passmyvalue4"]; TextBox5.Text = (string)Session["passmyvalue5"]; TextBox6.Text = I don't know ; } } } THanks for the help

    Read the article

  • asp.net vb user control raising an event on the calling page

    - by jvcoach23
    i'm trying to learn about user controls. I created a user control that has a textbox and a button. What i'd like to be able to do is when i click the button in the user control, populate a label in the aspx page. I understand that i could just have a button on the page that uses some properties on the user control to get that information.. but i'd like to know how to do it with the button the user control.. the reason for this is the button is just an example.. a learning tool. if i can get this working, i'd likely be putting thing in the user control that might require this kind of passing information. Anyway.. i've found some c# examples that i tried to get working as vb.. but once started getting into the delegates and events.. well.. it made me turn to this post. anyway.. hopefully someone can lend a hand.

    Read the article

  • MS Access: Order of Events in event ApplyFilter (ADP Project)

    - by Jose Valdes
    I'm having problems with the execution of ServerFilterByForm in Access 2003 When I apply the entered filter it returns the requested data but after it appear on screen (Form) it disappears. Don't know why this is happening Does anyone had the same problem? How can it be solved? Heris is part of the code Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer) Dim stSql As String If Len(ServerFilter) > 0 Then stSql = "SELECT * FROM v_InitialReviewQuery " & _ " WHERE " + ServerFilter & _ " ORDER BY acctnumber" Else stSql = "SELECT top 1 * FROM v_InitialReviewQuery ORDER BY acctnumber" End If Me.RecordSource = stSql End Sub

    Read the article

< Previous Page | 140 141 142 143 144 145 146 147 148 149 150 151  | Next Page >