Search Results

Search found 17944 results on 718 pages for 'window focus'.

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

  • How not to lose focus on a login page

    - by Misha Moroshko
    I have a simple login form with 2 input fields: "username" and "password". "username" field is focused by default. The problem is that when user clicks outside "username" or "password" fields, the focus is gone (it is neither on "username" nor on "password" fields"). How can I force the focus to be on these 2 fields only ? In my case, this is a really annoying behavior, so I really want to do this :) Can I do something like: $("*").focus(function() { if (!$(this).hasClass("my_inputs_class")) { // How to stop the focusing process here ? } }); ?

    Read the article

  • jQuery Mobile focus next input on keypress

    - by user738175
    I have a jquery mobile site with a html form consisting of 4 pin entry input boxes. I want the user to be able to enter a pin in each input field without having to press the iphone keyboards "next" button. I have tried the following and although it appears to set the focus to the second input and insert the value, the keyboard disappears so the user still has to activate the required input with a tap event. $('#txtPin1').keypress(function() { $('#txtPin1').bind('change', function(){ $("#txtPin1").val($("#txtPin1").val()); }); $("#txtPin2").focus(); $("#txtPin2").val('pin2'); }); Is there a different event that I should be assigning to $("#txtPin2")? I have tried to implement http://jqueryminute.com/set-focus-to-the-next-input-field-with-jquery/ this also, but I found that it worked for android and not for iphone. Any help is greatly appreciate it.

    Read the article

  • Why $(":select").focus does not work while $(":input").focus works?

    - by user605660
    Hi. I have a JQuery code which does something when input or select elements get focus. Although my code for input element works, select element does not work. Here is what I do. <body> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(":input").focus(function () { //this works //do something }); $(":select").focus(function () { //this doesn't //do something }); }); </script> </body> I tried some variation on select, such as using $("select") instead of $(":select"), but did not work either. I am a beginner for JQuery. I appreciate if you could tell me how I can make it work. Thanks a lot!

    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

  • open new window javascript

    - by Midhat
    I have a window.open call in a page, whose window itself is opened by a window.open call. So there are 2 windows already on the screen Now On the next window.open call: IE7 opens a new window Firefox opens a new tab in the topmost parent window Chrome opens a new tab in current window Is it possible to make this behaviour same in all three browsers. (preferably like #3) Edit : my call is rly simple javascript:window.open("Attachment.aspx?docid=42")

    Read the article

  • distribution update made my close/minimize/maximize window buttons diappear

    - by Marc Sauvageau
    I am running an ubuntu/gnome3 environment. While running the upgrade manager on 12.04, I was informed that there was a distribution update but that it was partial. (whatever that means) After a few failed attempts at updating through the manager, I decide to run sudo apt-get update && sudo apt-get update. The updates seem to work however, the close/maximize/minimize buttons of all windows have disappeared. I also can no longer use the Alt+Tab function. I tried to post an image but I need more rep (sorry) I have tried to run the updates again but nothing changes. I'm still very new at this. I would appreciate it if you could use simple terms to describe or ask questions. Thanks in advance!

    Read the article

  • How do i set focus to a text box Html.TextBoxFor - mvc 2

    - by Liado
    Hi, I'm trying to set focus on a text box which generated in the following way: <%=Html.TextBoxFor(model = model.Email, new { style = "width:190px;Border:0px", maxsize = 190 })% i tried to use javascript which didnt help much. var txtBox = document.getElementById("Email"); if (txtBox != null) txtBox.focus(); Can someone help? Thanks.

    Read the article

  • How do you clear the focus in javascript?

    - by Andres
    I know this shouldn't be that hard, but I couldn't find the answer on Google. I want to execute a piece of javascript that will clear the focus from whatever element it is on without knowing ahead of time which element the focus is on. It has to work on firefox 2 as well as more modern browsers. Is there a good way to do this?

    Read the article

  • TextField focus on UIAlertView

    - by Nyxem
    Hello, I have a subclass of UIAlertView with 2 UITextField for login / password. My problem is that when I have finished to type my login and change the focus to the password field, there is a cursor on the login field and on the password field, but the focus is on the password field, so my question is, how can I make the cursor disappear on the login field ? Thanks for your help.

    Read the article

  • Giving dialogbox focus

    - by Dave18
    I'm creating a dialogbox with a picture control and whenever I initialize the dialog it sets the focus to that picture control, is there any way to give dialog the default without resetting the focus from picture control?

    Read the article

  • Set focus on a runing Activity

    - by Raymond
    Hi all, I have an Activity that keeps running after the HOME button is pressed (naturally) and of-course the focus is in the home screen, and when the running process ends i need to restore the focus on that activity... in more PC expression, i need to maximize the application ;) Any help is good. thx in advance.

    Read the article

  • Focus problem with multiple EditText's.

    - by Ashish
    I have an activity with two edittext controls. I am calling the requestFocus on the second edittext field since by default the focus goes to the first edittext control. The focus appears to be in the second edittext field (the second one gets the highlighted border), but if we try to enter any characters using the hardware keyboard the text appears in the first edittext control. Any ideas why it would be happening?

    Read the article

  • 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 disable all window borders from the VLC playback window

    - by Rob Thomas
    Is there a way to make the VLC playback window completely borderless (no title bar, no other borders)? Ideally, I would like the playback window to be completely borderless and then a separate window that has the controls (play, pause, timeline control, etc). UPDATES: I cannot use full screen mode, I would like playback window to be sized the same as the video, which is usually about 300x300 px. Also, I need to be able to position the window anywhere on the desktop. I'm using the Windows version of VLC.

    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

  • 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

  • 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

  • Swing- focus problem

    - by AlonaK
    Hi, In my application I have a frame, with toolbar (the toolbar contains some actions). I want the toolbar to be visible only when the window is focused. So, I registered a windowFocusListener on the window. The problem is- when the window is not focused and I click on the place where a tool bar action should be- the action is performed. This happens because the WindowFocusGained is called before the mouse button is released and when the mouse button released it calls the actionPerformed. Does anybody has any idea for a work around for this problem? Does anybody know how to determine wether the mouse button is clicked now?

    Read the article

  • WPF: Focus in a Window and UserControl

    - by Echilon
    I'm trying to get a UserControl to tab properly and am baffled. The logical tree looks like this. |-Window -Grid -TabControl -TabItem -StackPanel -MyUserControl |-StackPanel -GroupBox -Grid -ComboBox -Textbox1 -Textbox2 Everything works fine, except when the visibility converter for the ComboBox returns Visibility.Collapsed (don't allow user to change database mode), then when textbox1 is selected, instead of being able to tab through the controls in the UserControl, the focus shifts to a button declared at the bottom of the window. Nothing else apart from the controls displayed has TabIndex or FocusManager properties set. I'm banging my head against a brick wall and I must be missing something. I've tried IsFocusScope=True/False, played with FocusedElement and nothing works if that ComboBox is invisible (Visibility.Collapsed). <Window x:Class="MyNamespace.Client.WinInstaller" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" FocusManager.FocusedElement="{Binding ElementName=tabWizard}"> <Window.Resources> <props:Settings x:Key="settings" /> </Window.Resources> <Grid Grid.IsSharedSizeScope="True"> <!-- row and column definitions omitted --> <loc:SmallHeader Grid.Row="0" x:Name="headerBranding" HeaderText="Setup" /> <TabControl x:Name="tabWizard" DataContext="{StaticResource settings}" SelectedIndex="0" FocusManager.IsFocusScope="True"> <TabItem x:Name="tbStart" Height="0"> <StackPanel> <TextBlock Text="Database Mode"/> <loc:DatabaseSelector x:Name="dbSelector" AllowChangeMode="False" TabIndex="1" AvailableDatabaseModes="SQLServer" IsPortRequired="False" DatabaseMode="{Binding Default.DbMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" DatabasePath="{Binding Default.DatabasePath,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> </StackPanel> </TabItem> ... The top of the user control is below: <UserControl x:Class="MyNamespace.Client.DatabaseSelector" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="root" FocusManager.IsFocusScope="True" FocusManager.FocusedElement="{Binding ElementName=cboDbMode}"> <UserControl.Resources> <conv:DatabaseModeIsFileBased x:Key="DatabaseModeIsFileBased"/> <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/> </UserControl.Resources> <StackPanel DataContext="{Binding}"> <GroupBox> <Grid> <!-- row and column definitions omitted --> <Label Content="Database Mode"/> <ComboBox x:Name="cboDbMode" SelectedValue="{Binding ElementName=root,Path=DatabaseMode,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" DisplayMemberPath="Value" SelectedValuePath="Key" TabIndex="1" Visibility="{Binding AllowChangeMode,ElementName=root,Converter={StaticResource BooleanToVisibilityConverter}}" /> <!-- AllowChangeMode is a DependencyProperty on the UserControl --> <Grid><!-- row and column definitions omitted --> <Label "Host"/> <TextBox x:Name="txtDBHost" Text="{Binding ElementName=root,Path=DatabaseHost,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" TabIndex="2" /> <TextBox x:Name="txtDBPort" Text="{Binding ElementName=root,Path=DatabasePortString,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" TabIndex="3" />

    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

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