What is the best way (and I presume simplest way) to place the cursor at the end of the text in a input text element via JavaScript - after focus has been set to the element
Still the intermediate variable is needed, (see var val=) else the cursor behaves strange, we need it at the end.