Search Results

Search found 4289 results on 172 pages for 'focus stealing'.

Page 43/172 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • Capture Silverlight 4 event when panel clicked

    - by Eric J.
    I have a small Silverlight 4 app that essentially consists of a grid containing a label and a combo box. When I click the label, I replace it with a second text box so that I can edit the label (much the way you can edit the name of a Silverlight control in VS2010). I have a LostFocus event handler on the text box that will end editing when the control loses focus (restoring the updated label). Trouble is, users tend to click on the panel when they are done editing rather than on another control (or hitting Enter, which is also supported). I tried adding a left mouse down event handler to the panel. However, that only fires when the text box does not have the focus (I guess the text box captured the mouse?) Is there an approach to recognize that a non-input control was clicked that would enable me to terminate edit mode?

    Read the article

  • ASP.NET MaskedEditExtender issue

    - by Eyla
    I have asp.net textbox with MaskedEditExtender. I set ClearTextOnInvalid property to ture so when invalid text is entered should clear the text. in my case I have mask=(999)999-9999, when I enter forexample 4 number should then the focus lost should clear the text because i did not enter complete number that fit the mask?? what I want to clear the text when the focus lost if no complete number has entered!! here is my code: <asp:TextBox ID="txtHomePhone" runat="server" Style="top: 147px; left: 543px; position: absolute; height: 22px; width: 128px" ></asp:TextBox> <cc1:MaskedEditExtender ID="txtHomePhone_MEE" runat="server" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" Mask="(999)999-9999" TargetControlID="txtHomePhone" AutoComplete="False" ClearMaskOnLostFocus="true" ClearTextOnInvalid="True"> </cc1:MaskedEditExtender>

    Read the article

  • SetSel on EN_SETFOCUS or WM_SETFOCUS doesn't work

    - by Coder
    I've ran into next mystic thing in Winapi/MFC, I have an edit box, contents of which I have to select on Tab, Lclick, Rclick, Mclick and so on. The sort of obvious path is to handle the SETFOCUS message and call SetSel(0, -1), which should select all text. But it doesn't work! What's wrong? I tried googling, everyone seems to override Lclilks or handle SetSel in parent windows, but this is wrong from encapsulation point of view, also multiple clicks (user wants to insert something in the middle of the text) will break, and so on. Why isn't my approach working, I tried like 10 different ways, tried to trap all possible focus messages, looked up info on MSDN, but nothing works as expected. Also, I need to recreate the carret on focus, which also doesn't seem to work. SETFOCUS message gets trapped alright. If I add __asm int 3, it breaks every time. It's the create carret and setsel that gets swallowed it seems.

    Read the article

  • iPhone UIWebView becomeFirstResponder

    - by user505618
    I have an UIWebView with an <input type="text"/> html element in it. I want to focus the input element in the html and show the keyboard on the iPhone programmatically, without tapping the screen. I've tried the following: set the focus from JavaScript (in this case the onFocus JS event will fire but the keyboard won't show up) [webView becomeFirstresponder] (returns NO) set the first subview of the webView to be the firstResponder (returns NO) subclass UIWebView to return YES to canBecomeFirstResponder: (nothing happens) I'm trying to find the solution since yesterday but I couldn't find it. Please help.

    Read the article

  • Blackberry custom slideshow-style BitmapField manager

    - by Diego Tori
    Right now, I'm trying to figure out how to implement the following: Suppose I have a custom Manager that has about 10 or so BitmapFields layed out in a horizontal manner (similar to a slideshow contained in a HFM ) . What I want to achieve is to be able to move the image HFM via touchEvent horizontally, where a BitmapField would take focus on the left-hand side of the custom Manager. In other words, will I have to give a value to setHorizontalScroll and if so, is it a matter of just incrementing that value when the user makes a left or right touch event. Also, how can I get the focus of a Field within a given position on the screen (i.e. the left-most Field on the HFM) when the HFM is scrolling sideways via touchEvent?

    Read the article

  • Problem with EditText.requestFocus()

    - by synic
    In the onCreate() of an activity, I've got a call to requestFocus() on an EditText. Immediately after, I've got the following: System.out.println(mEdit.isFocusableInTouchMode()); System.out.println(mEdit.isFocusable()); System.out.println(mEdit.isFocused()); These were just put in while I was trying to figure out what is wrong with this activity... they all print "true". However, as you may have guessed, the EditText does NOT have focus, and if I try to start typing, nothing happens. I have to click on the EditText to being typing. I can't see that anything else has focus, but obviously something has to have it.. how can I find out what it is?

    Read the article

  • Make NSFormatter validate NSTextFieldCell continuously

    - by harms
    In Cocoa, I have an NSOutlineView where the cells are NSTextFieldCell. The cell displays values which are strings that are formatted according to certain rules (such as floats or pairs of floats with a space in between). I have made a custom NSFormatter to validate the text, and this seems to work with no problem. However, the cell (or the outline view, I'm unsure what is causing this) only seems to use the formatter at the moment my editing would end. If I type some alphabetic characters into the text field (which violates the formatting rules), these characters show up -- the only way I notice the formatter doing its job is that I'm now prevented from moving keyboard focus away from this cell. If I return the contents of the cell to a valid form, then I can move focus away. I have set both the cell and the outline view to be "continuous". It would be better if I was unable to enter text into the cell in the first place. Is it possible to make it like that, and if so, how?

    Read the article

  • How to make controls "tabable" when loaded from plugin in Cocoa app?

    - by Randall
    I have an application thad loads in plugins that have their own UI. There is an IBOutlet called ContainerView in my AppDelegate. When the plugin loads, it puts its own view (that is stored in a xib in the plugin bundle) into the Container view like so [ContainerView addSubview:viewFromPlugin]; When the view loads, everything is fine but when I press tab the only controls that get any focus are ones outside of the ContainerView and none of them inside it get focus. I've tried setting the container view as the initialFirstResponder and I've tried hooking up the nextKeyView from the last button in the tab order to the ContainerView. Thanks.

    Read the article

  • Why not use javascript handlers on the body element?

    - by disown
    As an answer to the question of 'How do you automatically set the focus to a textbox when a web page loads?', Espo suggests using <body onLoad="document.getElementById('<id>').focus();"> Ben Scheirman replies (without further explanation): Any javascript book will tell you not to put handlers on the body element like that Why would this be considered bad practice? In Espos answer, an 'override' problem is illustrated. Is this the only reason, or are there any other problems? Compatibility issues?

    Read the article

  • Put text input inside label for radio button?

    - by Martijn
    I'm trying to make a radio group specifying a bunch of options, and an extra option "other" with a text input to specify. The code for this particular radio button I'm using is <input type='radio' name='RadioInput' value='Other' id='RadioInput_Other' /> <label for='RadioInput_Other'>Ohter: <input type='text' name='RadioInput_Other_Value' id='RadioInput_Other_Value' value='' /> </label> The idea is that if you give focus to the text input, the radio button corresponding to it is selected. The code above almost does this (since the text input is inside the label). However, it also shifts focus to the radio button (which is annoying, since whatever you type next is lost). Is there any way to prevent this using XHTML1.0 / CSS2? Preferably without using javascript.

    Read the article

  • Good Perlin noise resources/implementation?

    - by Chumpy
    Are there any good resources out there detailing Perlin noise generation? I understand that most languages have noise generating libraries available, but I'm interested in creating my own for fun/experience. I've already looked at this, which seems pretty popular, but it only gives an in-depth explanation of one dimensional noise. Google searches have been relatively unhelpful so far, as most of them focus on applications instead of how to create a generator. Books and/or websites are welcome, even if their focus is not the generation itself so long as it gives a thorough explanation of an implementation, or at least the concepts involved so I can "discover" my own.

    Read the article

  • How to check for empty values on two fields then prompt user of error using javascript

    - by Matthew
    Hello guys, I hope I can explain this right I have two input fields that require a price to be entered into them in order for donation to go through and submit. The problem that I am having is that I would like the validation process check to see if one of the two fields has a value if so then proceed to submit. If both fields are empty then alert. This is what I have in place now: function validate_required(field,alerttxt) { with (field) { if (value==null||value=="") {alert(alerttxt);return false;} else {return true} } } function validate_form(thisform) { with (thisform) { if (validate_required(input1,"Need a donation amount to continue")==false) {input1.focus();return false;} else if (validate_required(input2,"Need a donation amount to continue")==false) {input2.focus();return false;} } } I would like to ultimately like to get this over to Jquery as well Thanks guys any help would do Matt

    Read the article

  • jquery datepicker: select date as back as 6 months

    - by Abu Hamzah
    Start date: user can select start date as back as 6 months. example: if today is 04/23/2010 then i can go back up to 11/23/2009 but not more than 6 months. <script type="text/javascript"> $(document).ready(function () { $('#endDate').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function () { }, onClose: function () { $(this).focus(); } }); $('#startDate').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function (dateText, inst) { $('#endDate').datepicker("option", 'minDate', new Date(dateText)); } , onClose: function () { $(this).focus(); } }); }); update code: var currentDate = new Date(); var currentMonth = currentDate.getMonth() + 1; var sixMonths = currentMonth + 6 currentDate.setMonth(currentDate.currentMonth, sixMonths); var myNewCurrentDate = new Date(currentDate) $('#startDate').datepicker('option', { minDate: myNewCurrentDate }); i am getting currentDate = NaN

    Read the article

  • How to change Arrow Keys Behavior?

    - by SO give me back my rep
    Hi, I am doing a cool menu (sorta XMB) to give a fresh touch to my app... I add all of the elements on the menu programatically via DB. the menu is designed for easy use with arrows keys but I have encountered a major problem!!! by default when I press the arrow keys they only change the focus based on the tabindex and what I need is to change focus based on position of the controls not on their tabindex hope it is clear... see pic!!! so, Is there any way to do this?

    Read the article

  • Validate Canadian Postal Code Regex

    - by Alex Block
    I have a script written in JavaScript to Validate Canadian Postal Codes using Regex, however it does not seem to be working. Here is the script: If statement: if (myform.zip.value == "" || myform.zip.value == null || myform.zip.value == "Postal Code" || myform.zip.value.length < 12 ) { alert("Please fill in field Postal Code. You should only enter 7 characters"); myform.zip.focus(); return false; } Function: function okNumber(myform) { var regex = /^[ABCEGHJKLMNPRSTVXY]{1}\d{1}[A-Z]{1} *\d{1}[A-Z]{1}\d{1}$/; if (regex.test(myform.zip.value) == false) { alert("Input Valid Postal Code"); myform.zip.focus(); return false; } return true; }

    Read the article

  • trigger onchange event manually

    - by Anitha
    Hi all, I'm setting a date-time textfield value via a calendar widget. Obviously, the calendar widget does something like this : document.getElementById('datetimetext').value = date_value; What I want is : On changing value in the date-time textfield I need to reset some other fields in the page. I've added a onchange event listener to the datetimetext field which is not getting triggered, because I guess onchange gets triggered only when the element gets focus & its value is changed on losing focus. Hence I'm looking for a way to manually trigger this onchange event (which I guess should take care of checking the value difference in the text field). Any ideas ? Thanks in advance, Anitha

    Read the article

  • How to show error message with jquery tooltip?

    - by bala3569
    I am validating my controls in a form... if a control is empty i would like to show a jquery tooltip with that error msg.. Here is what i am doing... if (document.getElementById("ctl00_ContentPlaceHolder1_ListDiscipline") .selectedIndex == -1) { document.getElementById("ctl00_ContentPlaceHolder1_ErrorMsg").innerHTML = "please select your Discipline"; document.getElementById("ctl00_ContentPlaceHolder1_ListDiscipline").focus(); return false; } and i would like to do like this, if (document.getElementById("ctl00_ContentPlaceHolder1_ListDiscipline") .selectedIndex == -1) { // show tooltip besides the control with the error message... document.getElementById("ctl00_ContentPlaceHolder1_ListDiscipline").focus(); return false; } Any suggestion...

    Read the article

  • jQuery's blur() and selector problem

    - by matthewayinde
    I'm trying to create a new div each time a text field contained in the last div loses focus, but a new div is added only when the text field in the first div loses focus (instead of the last)... Please I need help urgently. Thanks a lot. Here's my code: $(function() { $(':text:last').blur(function() { $('<div class="line"><span>data: </span><input type="text"/></div>') .appendTo($('#lineStack')); }); }); HTML: <div id="lineStack"> <div class="line"> <span>data: </span><input type="text" /> </div> </div>

    Read the article

  • ListView OnItemClickListener Not Responding?

    - by GuyNoir
    I've looked everywhere for a solution to this, but I can't figure out how to implement it. My OnItemClickListener was disabled somehow on my ListView rows, because I have an ImageButton in the row layout, which takes over the focus. There have been numerous questions I've found, but none of them have gotten me anywhere. I've checked this question, but I couldn't really make heads or tails of it. I just need a way to get the rows clickable so that I can detect when a row is pressed. Long press and focus work fine.

    Read the article

  • Retail knowledge inference

    - by blueomega
    So i am doing a research on how can i infer knowledge from reports (not with a specific format), but after pre processing, i should have some kind of formatted data. A fairly basic inference would be: "Retailer has X stock." and "X is sellable." - "Retailer sells X" the knowledge i focus is retail domain oriented, and if possible i should improve its efficiency with each iteration. Is this scifi(some of my friends think it is)? The related stuff i find online are "expert systems" that find anomalies, fuzzy inference systems and some rants about "easy knowledge". Can you help me with some points for me to focus or orient me in some research directions? blueomega

    Read the article

  • How to keep submit button visible and executable upon textarea onblur

    - by ninumedia
    I have a <div id="comment_posting_holder"> tag that holds a form with two elements: a textarea box and a submit button. I want to have the div tag (containing the textarea and submit button) disappear if I click somewhere "OTHER" than the submit button. I have a start for the code below. So upon leaving focus from the textarea, I can make the div tag disappear. I tried placing in a mouseclick event inside the blur function for the submit button but that did not work. Any suggestions? Thank you! **Facebook does this with it's comments. If you click on a "Post your comment..." field the textarea appears and then it will disappear upon losing focus other than if you pressed the submit button. $('textarea').blur(function() { $('#comment_posting_holder).hide(); });

    Read the article

  • Dealing with distractions

    - by Onorio Catenacci
    How can I cut-out distractions? Are noise-canceling headphones suitable, and are any specific models recommended? I had a fellow programmer that used to use some headphones to help her shut out distractions and focus on her work. Lately I find that I am less able to focus without quiet and therefore I'm thinking of investing in some headphones. I'm sorry – I suppose this is sort of an open-ended question but I don't want to spend $50 on headphones only to find out they won't help me.

    Read the article

  • why doesn't hitting enter when a SELECT is focused submit the form?

    - by Marc
    Consider the following HTML: <form action=""> <input /> <select> <option>A</option> <option>B</option> </select> <input type="submit" /> </form> If the focus is on the input (text box) and I hit enter, the form submits. But, if the focus is on the select (dropdown box) and I hit enter, nothing happens. I know I could figure out some JavaScript to override this, but I want to know why hitting enter doesn't just work? Is there something I would break by capturing the enter with JavaScript (maybe some native keyboard accessibility of the dropdown)?

    Read the article

  • Phonegap - iOS keyboard is not hiding on outside tap of input field

    - by Prasoon
    On input text focus, keyboard appears as expected. But when I click outside of the input text, keyboard does not hide. I am using java script and jQuery. With jQueryMobile JS and CSS - page behaves correctly. But for this project we are not using jQueryMobile. This problem is only with iOS simulator/device. With Android, it's working perfectly fine. I even tried using document.activeElement.blur(); on outer element click/tap. But then I am unable to focus to input text, because that input text is inside that outer element.

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >