Hello all 
happy new years
Im not good at javascript but have got this code to input text into the textbox with tags
but what i want to do is to replace only the selected text instead of the whole thing
i have mucked around with it but cant seem to get anything
can anyone help ?
happy new years
Im not good at javascript but have got this code to input text into the textbox with tags
but what i want to do is to replace only the selected text instead of the whole thing
i have mucked around with it but cant seem to get anything
Code:
<SCRIPT LANGUAGE="JavaScript">
function seeTextArea (form,tag) {
if (document.form1.text.value != '')
{
document.form1.text.value = '<' + tag + '>' + form.text.value + '</' + tag + '>'
alert (form.text.value);
}
}
</SCRIPT>
can anyone help ?