+ Start a Discussion

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.....User-added image  
the focus should on the place after b.......... any ideas ?~
Best Answer chosen by doravmon
There's a really good article at : http://codetheory.in/javascript-control-input-field-caret-position-or-move-to-end-in-textboxes-and-textareas/