focus

Is there a cross-browser method to bring a popup window into the foreground?

I have a chat in a popup browser window. This chat page (ASP) checks for new messages every 10 seconds. I would like to bring this popup window to front when there is a new message. I tried with "window.focus()", but this work only in few version of IE. Are there other options to achieve my goal? ...

JavaScript: Visibility error in Internet Explorer when setting focus on an input element

This may be the most obscure bug I have yet encountered in many years of working with JavaScript and any version of Internet Explorer. We're using YUI 2.7 for some of the (non)convenience methods. Sigh, what I would do for jQuery.... This is affecting Internet Explorer 6 and Internet Explorer7. Internet Explorer 8 behaves properly. All ...

Interacting with a form without it activating

Hello. I'm trying to implement code-completion popup window in my project. The window is derived from Form. It contains two controls: custom list derived from UserControl (it shows completion possibilities with icons) and a VScrollBar. When the popup appears, it doesn't steal focus from the editor (form's ShowWithoutActivation is overri...

Question about an application not getting focus in XP/W2K3

I have an application written in .NET. The previous version had no problems: you double-click on the icon or run it from a command line and when it starts up, it's the main window and has focus as you'd expect. The latest version displays a splash screen before the main window and now the splash screen comes to the foreground ok but th...

Is there any pure-html attribute to specify which element should be focused on load

And if there isn't, is there a good reason why? ...

ms access auto fill main form based on focus of subform

i have a data entry/editing form with two combo boxes (Name and Group). Each Group correlates to multiple names but each name is in only one group. At the bottom of this form is a subform which is a continuous form displaying a query of the associated table filtered based on an unbound combo from which you select the group. Basically ...

HTML form needs double click to focus on field

For some reason one of my forms (I have 2 forms in the same page) is not working properly because I need to double click on each form field in order to be able to enter data. Any ideas why this may be happening? ...

WPF Accept input without focus

I've created a screen in WPF that accepts input from a barcode scanner. I listen to PreviewTextInput event, and the KeyUp event, which let's me determine what the scanner "typed", and when it finished. It works great. You just have to have the form displayed and it will accept barcode scans. The problem is, I have other controls on the ...

to focus on the window.open and current window

It seems simple but I did not find a way. I open a window: a. I need that while opening the window is minimized. b. when finished loading, I need to be normalized and then focus on the parent window. --Code var openwindow = null; $(function(){ openwindow = window.open("http://www.domine.com", "winx", "width=200,height=30,too...

.Net form focus

I Have a .net form with multiple controls in it.. Textbox , labels ... When the form is shown on screen the textbox get the focus by default. When i try to scroll the form using mouse scroll wheel the scroll messages are basically going to Textbox and hence the form is not getting scrolled.. I tried setting textbox.capture = false fo...

set focus to iframe body/content in firefox ?

hi, i have an ifram, which has hidden visibility. i click on button - iframe will be visible and i want to focus on its body/content. because now i must click on button and then into iframe, so thats two clicks. i want to do it on one click, but dont know how to focus in firefox. in explorer it is ok: var iframe_window = window.frame...

AjaxControlToolkit combobox and focus behaviour

I have a requirement in a web application to duplicate the winforms combobox, with both the ability to select from the drop down list and to type text into the control. I've been looking at the AjaxControlToolkit combobox control since it gives the two behaviours along with other nice things like autocomplete. This is working fine but I...

focus() not working...

I have the following jQuery line: $('#newStep2 input#name').focus().css('background','Red'); Where I am trying to set the focus of a textbox (#name). I am only setting the background to debug to make sure it works. Well, the background turns red, but the input is not receiving the focus. Um? EDIT HTML, per request: <fieldset id="...

KeyboardFocusManager.setCurrentKeyboardFocusManager() breaks focus

I overrode DefaultKeyboardFocusManager to provide some special behavior for the Alt key. However, after setting this, I notice that hitting Tab on some of my text fields does not work. I also experimented with even calling the following on the AWT, but this still exhibited the broken Tab behavior: KeyboardFocusManager.setCurrentKey...

WPF TreeView focusing on newly added item

I have a sorted tree view with a lot of item. When I am adding a new item I would like the newly added item to be selected and shown on the screen. For example: if I am seeing the first 10 items on the screen and the new item is added on 20th position then the view should change to present the new added item (it can be the first one on t...

moveFocus is not called

I have a custom object list field with implemented scrolling routine. public int moveFocus(int amount, int status, int time) { invalidate(getSelectedIndex()); int unused = super.moveFocus(amount, status, time); return Math.abs(unused) + 1; } public boolean navigationMovement(int dx, int dy, int status, int time) { if (dy >...

Specifying Where To Focus Within Textarea

I have a textarea... <textarea> Some writing here * Then some more on another line </textarea> What I want to do is focus the user where the * is. Is this possible? ...

creating a select element via js, focus doesn't work in IE

Hi there! I'm a newbie in js and I'm afraid that i haven't the knowledge to resolve the next issue. If I have a select element ( populated with several options ) already parsed by the browser on the load, the next code works just fine in both IE and FF $('selectId').focus(); but if I create ( and populate it ) the element via js va...

Android, how to get information on which activity is currently showing (in foregorund)?

Hi, I wonder if there is a way to get information on which activity currently has focus (is in the foreground)? I am using instrumentation and I would like to know which activity is currently running in the application that I am testing against. Thanks ...

Stopping the jQuery blur event within the blur function.

I have a textbox that I am using the blur event to validate the text with a regular expression. If it fails I want the textbox to keep the focus. I know in regular javascript you can say return functionName(); in the onblur event within the actual html control. Is there a way to do something similar when binding the blur event within the...