I found a possible solution to my question, however, since I'm new to javascript I can't seem to get the desired behaviour.
The solution is posted by mcpDESIGNS here
Set keyboard caret position in html textbox
What I wish to have is force the caret position back to 0 as soon as the field is focused I have created a fiddle which will help demonstrate what I'm doing.
fiddle: http://jsfiddle.net/KuLTU/
addLoadEvent(function() {
document.getElementById("search_string").onfocus = search_field_focus;
});
function search_field_focus() {
setCaretPosition("search_string", 0);
}
I assume the why I'm calling setCaretPosition is wrong, any suggestion?