Link to home
Start Free TrialLog in
Avatar of BILL Carlisle
BILL CarlisleFlag for United States of America

asked on

jQuery - How can I give focus and start typing without touching the mouse?

Hi,
I have a dynamic action that ends with

$('#P21_DVD_NAME').focus();

Open in new window


and it puts focus on the field but you can't start typing..
You still need to click in the text field.. then type..

How can I give focus and start typing without touching the mouse?

thank you, Bill
Avatar of Mrunal
Mrunal
Flag of India image

Hi
Is it that separate window in which your textbox present?
If yes, then that window is not ACTIVE window and that's why you can not start typing even if you are seeing cursor is in textbox.

Can you share your complete scenario?
Avatar of BILL Carlisle

ASKER

if I

click off

the field on the bottom of the screen it fires the dynamic action that does an autosave then sets focus to the field but

doesn't allow

immediate typing without clicking into the field.

If the user

tabs off

the field on the bottom of the screen it fires the dynamic action that does an autosave then sets focus to the field and

allows

immediate typing without clicking into the field.
hi, when this dynamic action happens has the page already been fully loaded? or is it something that happens while loading the page or immediatly after the loading of the page?
Page is loaded and sitting there and a save occurs using dynamic action with PL/SQL  which is Ajax So the page does not re- render or submit
I am thinking something else happens after my focus code but I can't find where that would be
ASKER CERTIFIED SOLUTION
Avatar of APoPhySpt
APoPhySpt
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ahhh, Is there a way to check the completion before executing the next step, which is the set focus?
is there any way you can post some code or a link to the site? it might be possible to just change the focus line inside you function, or you might have to handle the event that controls when the assynk callback has ended.
No, I can't allow access to the app or take the time to put it on Apex.com
I appreciate the help, thank you
Thank you! That was it... I rearranged the order of execution and it the was working correctly.