Search Results

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

Page 4/172 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Jquery question : maintain focus upon appending a row?

    - by PoppySeedsAndAppleJuice
    The function below checks whether the id entered is already in the database, and if it is, then it adds some html to the table. I'm not sure if it's directly related to my issue or not, but, essentially, a user will place the focus on the id input field and enters an id. Using ajax, it posts to a php script and returns data if rows are found and nothing if it doesn't. If the user then tabs over to the next input field (zipcode), or clicks in another input field, they essentially have to do so twice. The cursor "flashes" in the field briefly and then focuses out. I tried adding in a focus(), but the behavior didn't change. So, the html looks like this: <table id="tableSearchData" class="searchlist" style="width: 789px;"> <thead> <tr> <th>ID</th> <th>Zip Code</th> <th>Radius (in miles)</th> </tr> </thead> <tbody> <tr class="odd"> <!-- PROBLEM is described below --> <!-- User clicks in <input name="id[]"> and ID is checked --> <!-- User presses "tab" or clicks in <input name="zipcode[] (in the *same* row) and cursor flashes, then goes out of focus so that the user has to click in the field again --> <td class="center sorting_1"><input type="text" value="" name="id[]"></td> <td class="center"><input type="text" value="" name="zipcode[]"></td> <td class="center"><input type="text" value="" name="radius[]"></td> </tr> </tbody> </table> Here's the jquery function... Like I said, I'm not sure if it's directly related to the problem I'm having, but, thought I should include it because I suppose it's likely there is something happening there... $("#tableSearchData > tbody > tr > td > input[name=id[]]").focusout(function() { var row = $(this).closest("tr").get(0); var sData = $(this).serialize(); $.ajax({ type: "POST", url: "checkid.php", data: sData, success: function(html) { $(row).replaceWith(html); $(".preset").each(function() { $(this).attr("disabled", true); }); $(row).closest("input[name=zipcode[]]").focus(); } }); });

    Read the article

  • How to set cursor focus onload?

    - by eswaramoorthy-nec
    Hi, I use h:selectOneRadio tag. I need to set the cursor focus to first radio field. <f:view> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <h:form id="focusForm" > <h:selectOneRadio id="testRadioId" value=""> <f:selectItem id="si1" itemLabel="JSF" /> <f:selectItem id="si2" itemLabel="JSP" /> </h:selectOneRadio> </h:form> </body></html></f:view> here The Firefox (browser) assign id :focusForm:testRadioId:0 that field. So i use the following script: document.getElementById("focusForm:testRadioId:0").focus(); But, Some times, i may change dynamically disable the radio field from backing bean. <h:selectOneRadio id="testRadioId" value=""> <f:selectItem id="si1" itemLabel="JSF" itemDisabled="true"/> <f:selectItem id="si2" itemLabel="JSP" /> </h:selectOneRadio> So here i disable the first radio button. Now, If i use the same script, then not set cursor focus to first radio field. how to handle this? that means how to alter my script dynamically during onload? Please help me. Thanks in advance.

    Read the article

  • onLoad focus() event within jquerytools overlay effect

    - by tomcritchlow
    Hi, I'm using the overlay jquery from here: http://flowplayer.org/tools/overlay/index.html Within my overlay I have a search box like this: <div class="simple_overlay" id="asearch"> <div id="searchbox"> <form id="amazonsearch" style='float:left;'> <input class="title" id="amazon-terms" style="width:400px;font-size:2em;"> <button class="sexybutton sexysimple sexygreen">Search</button> </form> <div id="amazon-results"></div> </div><!--seachbox--> </div><!--Overlay--> What I want to happen is when you load the overlay the search box within the overlay gains focus so you can start typing into it. I thought that this would work: $("a[rel]").overlay({ onLoad: function() { $('#amazon-terms').focus(); } }); But that doesn't seem to do anything. I know the event is firing because this works: $("a[rel]").overlay({ onLoad: function() { alert('popup opened') } }); However, when this alert fires the overlay has not yet appeared on the screen so I wonder if that is part of the problem? According to the docs onLoad should fire "when the overlay has completely been displayed" (ref) Any help appreciated! :) Thanks Tom EDIT This code does what I want it to but I'm none the wiser as to why this works when the code above doesn't.... var triggers = $("a[rel]").overlay({ closeOnClick: false, onLoad: function() { $('input').focus(); } });

    Read the article

  • "Work stealing" vs. "Work shrugging"?

    - by John
    Why is it that I can find lots of information on "work stealing" and nothing on "work shrugging" as a dynamic load-balancing strategy? By "work-shrugging" I mean busy processors pushing excessive work towards less loaded neighbours rather than idle processors pulling work from busy neighbours ("work-stealing"). I think the general scalability should be the same for both strategies. However I believe that it is much more efficient for busy processors to wake idle processors if and when there is definitely work for them to do than having idle processors spinning or waking periodically to speculatively poll all neighbours for possible work. Anyway a quick google didn't show up anything under the heading of "Work Shrugging" or similar so any pointers to prior-art and the jargon for this strategy would be welcome. Clarification/Confession In more detail:- By "Work Shrugging" I actually envisage the work submitting processor (which may or may not be the target processor) being responsible for looking around the immediate locality of the preferred target processor (based on data/code locality) to decide if a near neighbour should be given the new work instead because they don't have as much work to do. I am talking about an atomic read of the immediate (typically 2 to 4) neighbours' estimated q length here. I do not think this is any more coupling than implied by the thieves polling & stealing from their neighbours - just much less often - or rather - only when it makes economic sense to do so. (I am assuming "lock-free, almost wait-free" queue structures in both strategies). Thanks.

    Read the article

  • Difference between focus and focus-in(out)-event signals

    - by spajak
    Hello What's the difference between "focus" and "focus-in(out)-event" signals in GTK+? Which one is emitted firs? How are they related to keyboard(TAB) & mouse clicks. Do they depend on each other? I'm asking this because I want to keep track of currently focused widget within toplevel window and I don't want to test HAS_FOCUS flag of every widget when I need it. The widgets I'm interested of are deep inside other containers, boxes etc. What would be the best way in this situation for keeping & updating focused widget pointer?

    Read the article

  • Initiating UserControl via MVVM in WPF / focus issue.

    - by benndev
    Hi there I have a few usercontrols loaded into a tabcontrol via MVVM in WPF. Within the XAML for the usercontrol I am setting focus to a textbox using the FocusManager, however this appears to only work when the first instance of the usercontrol is created. Just to test I added a loaded event handler to the usercontrol - this is only called on the first instance. I'm using data templates for the user controls as follows: <DataTemplate DataType="{x:Type local:UserTypeViewModel}"> <local:UserTypeView /> </DataTemplate> The textbox is focused as follows: FocusManager.FocusedElement="{Binding ElementName=txtName}" Additionally I'm using a global event handler (for the textbox GotFocus event) which selects all the text using a dispatcher. If anyone has any tips on how to achieve focus with every usercontrol I'd be very grateful. Thanks, Ben.

    Read the article

  • Listen for keypress while iframe has focus?

    - by Matrym
    Is there any way to listen for keypress events in a parent page while the iframe has focus? Or, alternatively, is it possible to pull away the focus from the iframe? Please note, the iframe is not within the same domain, so I cannot modify it's contents via javascript. I've tried the following jquery in the parent page, thinking perhaps an intermittent blur would work, but it doesn't seem to. function iframeBlur(){ $("#iframe").blur(); } var blurif = setInterval(iframeBlur, 500); Thanks for your time!

    Read the article

  • Focus In An ItemsControl

    - by Andrew
    I have an ItemsControl that uses a DataTemplate. The DataTemplate contains a TextBox, which can receive keyboard focus. I need to be able to move the keyboard focus from the currently focused TextBox in the DataTemplate to the next TextBox, as if the Tab key has been pressed. I've noticed that there is a UIElement.MoveFocus() method, but this begs the question as to which UIElement should be used to call the method. This is probably the reason why I haven't gotten this method to work for me... Any help would be really appreciated! Thanks, Andrew

    Read the article

  • Set the focus on Popup Panel

    - by Jan-Frederik Carl
    Hello, I use a modalpopupextender to show a popup when the user clicks on a button. <ajaxToolkit:ModalPopupExtender ID="mpe1" runat="server" TargetControlID="statusInfoLb" PopupControlID="statusInfoPanel" DropShadow="false" OkControlID="okBtn" OnOkScript="onOk()"> </ajaxToolkit:ModalPopupExtender> <asp:Panel ID="statusInfoPanel" runat="server" Height="185px" Width="454px" SkinID="Panel_Notification2" DefaultButton="okBtn"> The panel has an OK-Button to dispose the popup. It is also possible to click Return to dispose the popup, because the panel has the property DefaultButton="okBtn". But this only works when the popup has the focus, which is not so from the start. How do I get the popup panel to have the focus when it shows? I would like to use jQuery.

    Read the article

  • WPF: KeyboardNavigationMode.Contained doesn't work to suppress focus wrap

    - by codymanix
    I want to navigate in my window with the arrow key. It works so far but if I reach the end of my window, focus wraps to the first main menu item. But I want that focus stops at the last control in my window. private void Window_PreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Down) { elem.MoveFocus(FocusNavigationDirection.Next); } } "elem" is indirect child control of "stackPanel". MoveFocus always returns true and I already tried: KeyboardNavigation.SetTabNavigation(stackPanel, KeyboardNavigationMode.Contained); KeyboardNavigation.SetDirectionalNavigation(stackPanel,KeyboardNavigationMode.Contained); KeyboardNavigation.SetControlTabNavigation(stackPanel, KeyboardNavigationMode.Contained); Nothing helped.

    Read the article

  • :focus in IE not working

    - by o-logn
    Hey, I've created a site with CSS that requires the :focus pseudo class. I change the 'filter' and 'background-image' effects when a textbox is selected (i.e. has focus). This works in Chrome/FF, but doesn't seem to work in IE8 (and, presumable, previous versions if IE). I tried to look for answers, and have tried to use :active - but that doesn't work. Is there a way of changing attributes such as 'filter' using psuedo-classes? Failing that, can I do it in JS with the OnClick event? Thanks

    Read the article

  • Direct2D window black when not in focus

    - by Saul Rennison
    Hi all, I have a Direct2D window which paints fine when in focus; however, when focus moves to another window (same application or another), the entire window goes black. I pinned the issue down to the use of ID2D1HwndRenderTarget::Clear. This function is vital to my application as without it, painting becomes rather... weird. Is there a way an un-focused Direct2D window can paint as normal (note: WM_PAINT is being called as usual, as is Clear, BeginPaint, etc. all without error) Thanks in advance.

    Read the article

  • Using multiple SWF Object - Flash doesn't focus on rollover

    - by WiseDonkey
    I've got a page with multiple embeds of Flash objects, including dynamically created graphs. I'm including them all with SWF Object JS declared in the header. It works fine in the fact that all are loaded. But, for some reason when you move down on the page (so they're out of view) and back, or click on another object it no longer has focus when you're rolling over. I.e. I have a flash menu that moves on rollover. When you go down the page, click on something, then go back up it no longer response to rollover. I've seen bits on here and elsewhere about losing focus in Firefox (which is the browser Im using - i havent managed to find this bug in IE) but it's talking about literally not being able to type or whatever, when you click on it. This is on rollover. Has anyone got any advice or thoughts on this subject?

    Read the article

  • Set focus to another control after TreeView click

    - by Chintan Shah
    I have a TreeView control in a Windows application. I am opening another window from the TreeView click (Single Click) event (in tabbed environment, so all windows will appear as a tab in Visual Studio). I want to set focus to one control of the new window. The problem is that, I am able to set the focus on the double click event of the TreeView. But same doesn't seem to be working with the TreeView single-click event. Any workarounds?

    Read the article

  • JAVA-I don't want clicking on my app make other apps lose focus

    - by Auxiliary
    Wow, what a stupid question you might say. But is it possible? I have a mouse move event in a Jpanel and it works even when the application is not in focus, now can I have something like that for the clicking event or something similar. And most importantly I don't want other apps (even something like the main menu) to lose focus when i click on my app. I was the system's event queue but i'm not sure where that would lead me to. Thanks in advance.

    Read the article

  • WPF TabBarControl Setting Focus to element when tab changes

    - by Aran Mulholland
    I have a TabControl that is bound to a view model <TabControl ItemsSource="{Binding Path=ViewModelCollection}" > <TabControl.ItemContainerStyle> <Style TargetType="TabItem" BasedOn="{StaticResource {x:Type TabItem}}"> <Setter Property="Header" Value="{Binding Title}" /> <Setter Property="Content" Value="{Binding}" /> </Style> </TabControl.ItemContainerStyle> </TabControl> Each Tab simply contains a View Model Item. I use a data template to display this. <!-- View Model Template --> <DataTemplate DataType="{x:Type local:ViewModelItem}"> <DockPanel> <TextBox Text="I want this to have the focus"/> </DockPanel> </DataTemplate> When the current tab is changed i want the focus to be on the textbox (this is a simple example, in my production code i have a datagrid) in the data template. how do i accomplish this?

    Read the article

  • How do you maintain focus when a particular aspect of programming takes 10+ seconds to complete?

    - by Jer
    I have a very difficult time focusing on what I'm doing (programming-wise) when something (compilation, startup time, etc.) takes more than just a few seconds. Anecdotally it seems that threshold is about 10 seconds (and I recall reading about study that said the same thing, though I can't find it now). So what typically happens is I make a change and then run the program to test it. That takes about 30 seconds, so I start reading something else, and before I know it 20 minutes have passed, and then it takes (if I'm lucky!) another 10+ minutes to deal with the context switch to getting back into programming. It's not an exaggeration to say that some things that should take me minutes literally take hours to complete. I'm very curious about what other programmers do to combat this tendency (or if I'm unique and they don't have this tendency?). Suggestions of any type at all are welcome - anything from "sit on your hands after hitting the compile button", to mental tricks, to "if it takes 30 seconds to start up something to test a change, then something's wrong with your development process!"

    Read the article

  • Blackberry: How to properly handle focus traversal in custom field?

    - by DaveJohnston
    I am writing an app for Blackberry and I have the following problem: I have implemented a custom field by extending the Manager class. The field is quite simple, it consists of a label and two check boxes, yes and no. The fields are laid out so that the label is on the left and uses as much space as it can while still allowing room for the check boxes which are positioned next to each other at the right and vertically centred compared to the label (if it spans more than one line). So it looks like this: This is a question? O Yes O No Everything is fine so far in terms of laying out the fields. But now I am trying to handle focus traversal. First of all the default behaviour when the user scrolls up or down is to move between the yes and no options. I want to move to the next field above or below when up or down is pressed, so I did this: protected int moveFocus(int amount, int status, int time) { if (status == 537001984 || status == -1610481664) { // Up or down was pressed // Don't move focus between yes and no when up or down is pressed. return amount; } return super.moveFocus(amount, status, time); } And that seems to work. The next thing I would like to do is to remember which option last had the focus when the field loses focus, then on gaining focus again (regardless of which direction the focus comes from) set this field to have the focus. I tried overriding onUnfocus and onFocus so that onUnfocus I note which field was focussed then onFocus setFocus to that field. But I get a StackOverflowError, I guess because the call to setFocus on a field within the manager actually calls onFocus for the manager itself again?? So does anyone know how I should be doing this? I checked the DateField and it has the exact behaviour I am looking for, i.e. it remembers if you were last on the day, month or year field and sets this field to focus when the field itself gets the focus.

    Read the article

  • Acrobat Reader ActiveX in WebBrowser stealing focus [C#]

    - by Maciej
    I'm using webBrowser.Navigate(url) control to display page. I noticed this action steals focus from current control (grid) and than I have problem to focus grid back (tired myGrid.Focus, .Select etc...) This is really annoying behaviour of browser... Does anyone knows how to prevent focus stealing by Browser or (if not) hot to force to focus control back ? EDIT: I've also tried webBrowser.DocumentCompleted event to focus back to grid EDIT 2 Good case to test this is openning PDF files webBrowser.Navigate(@"C:\TEMP\test.pdf") I believe this is ActiveX issue. On first glance it looks that this is not problem with focusing control but loosing entire Form focus... EDIT 3 I tried another approach: Form keyPress event: I thought I can capture form's keyPress and move focus from WebBrowser / AdobeReader ActiveX to my control. But surprisingly event is not fired! Looks Reader taken all control and there is no way to do anything programically until you do mouse click on (at least) form's caption Any advice (s) ?

    Read the article

  • WebBrowser prevent stealing focus in C#

    - by Maciej
    I'm using webBrowser.Navigate(url) control to display page. I noticed this action steals focus from current control (grid) and than I have problem to focus grid back (tired myGrid.Focus, .Select etc...) This is really annoying behaviour of browser... Does anyone knows how to prevent focus stealing by Browser or (if not) hot to force to focus control back ? EDIT: I've also tried webBrowser.DocumentCompleted event to focus back to grid

    Read the article

  • jquery accordion - set input focus for active accordion?

    - by KnockKnockWhosThere
    *Nevermind... figured it out... * did it like this: $("#accordion").accordion({ header:'h3', active: '#section1', autoheight: false, clearstyle: true, }).bind("change.ui-accordion", function(event,ui) { $("#text1").focus(); }); I've got an accordion all set up, and each div has a form within it. I'm just trying to figure out how to set the focus on an input field depending on which one is open... /* accordion */ $("#accordion").accordion({ header:'h3', active: '#section1', autoheight: false, clearstyle: true }); Basically, I want to set the cursor in the first input field for whichever section is open. The actual forms are much bigger, so I condensed it enormously... <div id="accordion"> <h3 id="section1"><a href="#">Section 1/a></h3> <div> <form id="form1" action="form.php" method="post"> <fieldset class="inside"> <input type="text" name="text1" id="text1" size="50" value="Default text" /> <input class="open" type="button" value="Submit" name="submit1" /> </fieldset> </form> </div><!--/div--> <h3 id="section2"><a href="#">Section 2</a></h3> <div> <form id="form2" action="form.php" method="post"> <fieldset class="inside"> <input type="text" name="text2" id="text2" size="50" value="Submit" /> <input class="open" type="button" value="Submit" name="submit2" /> </fieldset> </form> </div><!--/div--> <h3 id="section3"><a href="#">Section 3</a></h3> <div> <form id="form3" action="form.php" method="post"> <fieldset class="inside"> <input type="text" name="text3" id="text3" size="50" value="Submit" /> <input class="open" type="button" value="Submit" name="submit3" /> </fieldset> </form> </div><!--/div-->

    Read the article

  • How to change browser focus from one tab to another

    - by Max
    Hi Folks, I have a Javascript chat cient running in one bwroser tab (call it tab A). Now when a message arrives the user might be on another browser tab (call it tab B). I'm looking for ways to change the focus from tab B to my chat client (tab A) when such a message arrives. I could not find a way to do this. Any idea? Thanks, Max

    Read the article

  • Problem with focus in WPF

    - by Maurizio Reginelli
    I have an application with a WindowsFormHost, which contains an user control, and a DataGrid. When I hold down the left button on the user control, if the selection on the DataGrid changes (via data-binded property), I lose the focus. How can I solve that problem? Thank you.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >