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! Link to comment https://forums.phpfreaks.com/topic/41499-solved-place-the-cursor/ 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:)! Link to comment https://forums.phpfreaks.com/topic/41499-solved-place-the-cursor/#findComment-201227 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(); Link to comment https://forums.phpfreaks.com/topic/41499-solved-place-the-cursor/#findComment-201502 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() ! Link to comment https://forums.phpfreaks.com/topic/41499-solved-place-the-cursor/#findComment-201582 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.