You need to sign in to do that
Don't have an account?

Deselect inputText field after focus on..
Hi everyone, I have a question here:
in my apex page, I have a search field, user can serch for sth dynamiclly by typing. Here is the two code I use:
<apex:inputText id="inputField" value="{!serchFieldValue}" onchange="!myFunction">
<apex:actionFunction name="myFunction" action="{!getResult}" focus = "inputField"/>
After do the action, I want it focus back on the input field, but not select the input already there.....
the focus should on the place after b.......... any ideas ?~
in my apex page, I have a search field, user can serch for sth dynamiclly by typing. Here is the two code I use:
<apex:inputText id="inputField" value="{!serchFieldValue}" onchange="!myFunction">
<apex:actionFunction name="myFunction" action="{!getResult}" focus = "inputField"/>
After do the action, I want it focus back on the input field, but not select the input already there.....
the focus should on the place after b.......... any ideas ?~

There's a really good article at : http://codetheory.in/javascript-control-input-field-caret-position-or-move-to-end-in-textboxes-and-textareas/