Nightfire
01-20-2005, 02:45 AM
I'm clueless on how to do this, as my js knowledge is very limited. I have option/select menus, which trigger off js prompts to ask for text. Once the text is entrered, it goes into a textarea. Now I don't always want the text to go at the start or end of the textarea, but where the cursor is. I currenty have
function headers(type){
var newheader = prompt('Insert '+type,'');
document.form1.content.value += '['+type+']'+newheader+'[/'+type+'] \n';
}
How can I modify it to insert text where the cursor is? Ta
function headers(type){
var newheader = prompt('Insert '+type,'');
document.form1.content.value += '['+type+']'+newheader+'[/'+type+'] \n';
}
How can I modify it to insert text where the cursor is? Ta