I would like to place the cursor in an input field after a specific link is clicked. I'm using this for a small search engine.
Imagine an input field: []. Then some links which is adding a string like: Denmark, England etc. to the input field.
Now I need the cursor to be placed like this: "Denmark, [here]".
Is this possible?
* UPDATE *
I'm using this code right now to replace the text, how would you add the "position cursor"-trick with this?
$('#denmark').click(function(){
$('#searchBoxBig').val('Denmark, ');
});