amalosoul Posted March 6, 2007 Share Posted March 6, 2007 I have a text area, and I want to place the cursor not at the end of the text but after a certain number of characters can this be done? (some kind of focus() function that positions the cursor lets say 3 characters before the end of the text...) Thank you very much! Quote Link to comment Share on other sites More sharing options...
amalosoul Posted March 6, 2007 Author Share Posted March 6, 2007 Maybe I shouls be more explicit:)...for example when you click on this forum on insert code it shows something like and places your cursor inside cursor_here . I was wondering how this is done:)! Quote Link to comment Share on other sites More sharing options...
DanDaBeginner Posted March 7, 2007 Share Posted March 7, 2007 you can do something like this: document.getElementById("textarea").focus(); Quote Link to comment Share on other sites More sharing options...
amalosoul Posted March 7, 2007 Author Share Posted March 7, 2007 Thank you! I appreciate your answer but I have solved my problem, in the mean time:). I knew that function I needed an extension focus() ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.