Search Results

Search found 4180 results on 168 pages for 'm focus'.

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

  • window.focus(), self.focus() not working in firefox

    - by Nisanth
    Hi all i am developing a chat application ... i have multiple chat windows ... i want to know which windw contain new message ... i have the following code .. function getCount() { $.ajax({ type: "POST", url: baseUrl + '/Chat/count', data: "chat_id=" + document.ajax.chat_id.value, success: function(msg){ if(msg == 'new1') { self.focus(); //window.focus(); } } }); } If an operator attending both chat.... for example the url is like http://localhost/nisanth/admin/Chat/index/chatId/15 http://localhost/nisanth/admin/Chat/index/chatId/16 http://localhost/nisanth/user/Chat/index/chatId/15 http://localhost/nisanth/user/Chat/index/chatId/16 if the user 16 enter a message i need focus http://localhost/nisanth/admin/Chat/index/chatId/16 This code is work fine with IE but not in firefox...please give me a solution... the above code is in the same html

    Read the article

  • Firefox steals focus from RocketDock

    - by Eta Beta
    If Firefox (v3.6.28) is running, RocketDock (with Layering set to "Always on Top") shows above Firefox but if in Firefox I do certain things (such as writing a post or watching a YouTube clip) RocketDock does no longer show on top of Firefox. I also use another launcher (FSL) and when invoked that shows on top of Firefox while RocketDock does not... This problem only occurs with Firefox, while running any other application RocketDock pops up normally (on top). For various reasons I prefer not to change my Firefox version and I really hope someone can suggest a solution. I am going nuts. Thanks for your help :)

    Read the article

  • Windows scroll without focus

    - by DanielCardin
    So I have a windows 8 laptop at home, and a windows 7 laptop at work. Both have synaptics touchpads. The problem is that on the work laptop, I can scroll any window regardless of which one is currently focused. That is the behavior that I want on both computers. This does not currently happen on the windows 8 computer. I know I can use (and have tried!) wizmouse, alwaysmousewheel, katmouse, etc; but none of them work 100% like the work computer. katmouse sometimes stops working, alwaysmousewheel, ive had problems with it scrolling on its own, wizmouse sometimes makes the mouse lag. Others have just not worked. Before I got the work computer, I had resigned myself to it, but now I see that it works, out of the box without using any external programs, on an older operating system, and wonder why I cant get it to work the same way on my own computer! All my searches have just been people suggesting the external programs that ive already tried, so answers suggesting those aren't really what I'm looking for (unless its some magic I can do with the synaptics driver, which by the way is more up to date on the windows 8 computer that is doesnt work on).

    Read the article

  • Problem with giving focus to first element inside a container

    - by rahul
    Hi, I am just trying to cycle the focus between elements inside a particular element when the tab key is pressed. What I want to do is not to set focus to any element which is not a descendant of an element when tab is pressed from the last control inside the element. At that time the focus must be set to the first input element inside the container. I have done a sample and it its not working, and I am unable to figure out the issue. Sample can be found here The complete code is Script $(function(){ $(":input:last","#div1").bind("keydown", function(e){ if ( e.keyCode === 9 ) { var firstElem = $(":input:first","#div1"); firstElem.focus(); } }); }); CSS input.red { width: 200px; border: solid 1px red; } input { width: 200px; } HTML <input type="text" class="red" /> <div id="div1"> <input type="text" id="txt1" /> <select id="sel1"> <option>1</option> </select> <input type="text" id="txt2" /> </div> Any help would be appreciated. Thanks

    Read the article

  • JavaScript onchange, onblur, and focus weirdness in Firefox

    - by typoknig
    On my form I have a discount field that accepts a dollar amount to be taken off of the total bill (HTML generated in PHP): echo "<input id=\"discount\" class=\"text\" type=\"text\" name=\"discount\" onkeypress=\"return currency(this, event)\" onchange=\"currency_format(this)\" onfocus=\"on_focus(this)\" onblur=\"on_blur(this); calculate_bill()\"/><br/><br/>\n"; The JavaScript function calculate_bill calculates the bill and takes off the discount amount as long as the discount amount is less than the total bill: if(discount != ''){ if(discount - 0.01 > total_bill){ window.alert('Discount Cannot Be Greater Than Total Bill'); document.form.discount.focus(); } else{ total_bill -= discount; } } The problem is that even that when the discount is more than the total bill focus is not being returned to the discount field. I have tried calling the calculate_bill function with onchange but neither IE or Firefox will return focus to the discount field when I do it like that. When I call calculate_bill with onblur it works in IE, but still does not work in Firefox. I have attempted to use a confirmation box instead of an alert box as well, but that didn't work either (plus I don't want two buttons, I only an "OK" button). How can I ensure focus is returned to the discount field after a user has left that field by clicking on another field or tabbing IF the discount amount is larger than the total bill?

    Read the article

  • Some questions about focus on WPF

    - by ThitoO
    Hello, I've a little problem about focus on WPF. I whant to create a window, always on top, and that never get the focus (even if we click on it). Here's my solution : public partial class SkinWindow : Window { public SkinWindow() { InitializeComponent(); Loaded += ( object sender, RoutedEventArgs e ) => SetNoActiveWindow(); } private void SetNoActiveWindow() { WindowInteropHelper helper = new WindowInteropHelper( this ); SetWindowLong( helper.Handle, GWL_EXSTYLE, WS_EX_NOACTIVATE ); LockSetForegroundWindow( LSFW_LOCK ); } const int GWL_EXSTYLE = -20; const int WS_EX_NOACTIVATE = 134217728; const int LSFW_LOCK = 1; [DllImport( "user32" )] public static extern bool LockSetForegroundWindow( uint UINT ); [DllImport( "user32" )] public static extern IntPtr SetWindowLong( IntPtr hWnd, int nIndex, int dwNewLong ); } First problem : It's works, but I've to select an other window to "remove" the focus of my application (after the focus is not gave again, even if I click on my window). Second problem : When I move or resize the window, the modifications happens when I drop the window. Do you have any ideas / links / docs ? Thank you :)

    Read the article

  • Set focus on div contenteditable element

    - by sanceray3
    Hi all, I try to explain my problem, because I really need your help. I have a <div contenteditable=true> where I define by a WYSIWYG some elements. For example <p>,<h1>, etc. I would like to put directly the focus on one of this elements. For example on <p id="p_test">. But it seems that focus() function doesn't work on <div> elements, <p> elements... Is there a another means to define the focus in my case ? Thank you very much for your help !

    Read the article

  • Set focus and carret position in textarea according to mouse position, as if user had clicked

    - by JeanHuguesRobert
    Once a page with a textarea is loaded, I want some textarea to have the focus immediatly if the mouse cursor is inside that textarea. This is the easy part because a onmousehover handler can set the focus. Now, how to I also set the position of the caret? I would like the caret to be where it would be if the user had clicked using the mouse to set the focus/caret. The basic use case is : User clicks on a link and waits (mouse barely moves) A page is delivered, it contains a big textarea only, full of text User types using keyboard Characters are inserted right below the mouse cursor Today the user has to wait until the caret is visible (at the top left of the textarea) and then click to move the caret before typing. Thanks!

    Read the article

  • How to re-focus to a text field when focus is lost on a HTML form?

    - by Horace Ho
    There is only one text field on a HTML form. Users input some text, press Enter, submit the form, and the form is reloaded. The main use is barcode reading. I use the following code to set the focus to the text field: <script language="javascript"> <!-- document.getElementById("#{id}").focus() //--> </script> It works most of the time (if nobody touches the screen/mouse/keyboard). However, when the user click somewhere outside the field within the browser window (the white empty space), the cursor is gone. One a single field HTML form, how can I prevent the cursor from getting lost? Or, how to re-focus the cursor inside the field after the cursor is lost? thx!

    Read the article

  • In Android Browser link does not always execute onClick causing focus instead

    - by Artem
    I am trying to program a very standard JS behavior for a link using an HREF onClick handler, and I am facing a strange problem caused by what I believe to be focus/touch mode behavior on Android. Sometimes when I click on the link, instead of executing the action, it simply becomes selected/focused, with either just a focus rectangle or even also with a filled focus rectangle (selected as opposed to just focused?). The pseudo-code right now is <a href="#" onClick="toggleDivBelowToShowHide(); return false;">go</a> I have tried doing something like: <a href="#" onTouchStart="toggleDivBelowToShowHide(); return false;">go</a> But I still get the same pesky problem some of the time.

    Read the article

  • 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

  • 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

  • Giving focus to GNOME docked window

    - by mike
    I've got a GTK/GDK docked window that I need to give keyboard focus to, so accelerator keys (shortcuts) work. Does anybody know if GNOME even allows a docked window to have keyboard focus, and if so, how can I enable it? Thanks, Mike

    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 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

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