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
LVL 2
BILL CarlisleAPEX DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MrunalCommented:
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?
0
BILL CarlisleAPEX DeveloperAuthor Commented:
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.
0
APoPhySptCommented:
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?
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

BILL CarlisleAPEX DeveloperAuthor Commented:
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
0
BILL CarlisleAPEX DeveloperAuthor Commented:
I am thinking something else happens after my focus code but I can't find where that would be
0
APoPhySptCommented:
well you must not forget that even tough you are not really fully loading the page, an ajax event is still a postback even though it is a partial one. you might me trying to set the focus prior to the end of the ajax request being completed. Cuz even though it might be transparent to the user where it seems the action is completed, something might still be happenning behind the scenes in an assynchronour manner
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BILL CarlisleAPEX DeveloperAuthor Commented:
Ahhh, Is there a way to check the completion before executing the next step, which is the set focus?
0
APoPhySptCommented:
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.
0
BILL CarlisleAPEX DeveloperAuthor Commented:
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
0
BILL CarlisleAPEX DeveloperAuthor Commented:
Thank you! That was it... I rearranged the order of execution and it the was working correctly.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.