Hi all,
I have a little problem that I hope some of you might be able to solve.
I want to add a predefined piece of text to a textarea but where the blinking cursor is, and not by the end of it.
I have the following:
<IMG SRC="grfx/smilie_01.gif" ALIGN="absmiddle" onClick="addSMILIE('[
]')" STYLE="cursor: hand;">
This adds the [
] to the textarea fine, but always by the end, and not where the input cursor is, here's the function I'm using:
function addSMILIE(code) {
document.frmPROPA.txtNEWS.focus();
document.frmPROPA.txtNEWS.value += (code);
}
How to insert the code to the textarea but where the input blinking cursor is and not by the end of it?
Thanks.
If you haven't heard of it, then you most likely don't need it.
---------------------------------------------------------------------
---------------------------------------------------------------------
I have a little problem that I hope some of you might be able to solve.
I want to add a predefined piece of text to a textarea but where the blinking cursor is, and not by the end of it.
I have the following:
<IMG SRC="grfx/smilie_01.gif" ALIGN="absmiddle" onClick="addSMILIE('[
This adds the [
function addSMILIE(code) {
document.frmPROPA.txtNEWS.focus();
document.frmPROPA.txtNEWS.value += (code);
}
How to insert the code to the textarea but where the input blinking cursor is and not by the end of it?
Thanks.
If you haven't heard of it, then you most likely don't need it.
---------------------------------------------------------------------
---------------------------------------------------------------------