Ekonime
Graham dont forget to add in other ex in guestbook
<textarea class="inp-textarea"
id="xtblog_comment_msg"
name="__xtcomments_msg"
Copy code
this is
__xtcomments_msg calling to guestbook
function tag(text1, text2) {
if ((document.selection)) {
document.post.[b]__xtcomments_msg[/b].focus();
document.post.document.selection.createRange().text = text1+document.post.document.selection.createRange().text+text2;
} else if(document.forms['post'].elements['[b]__xtcomments_msg[/b]'].selectionStart!=undefined) {
var element = document.forms['post'].elements['[b]__xtcomments_msg[/b]'];
var str = element.value;
var start = element.selectionStart;
var length = element.selectionEnd - element.selectionStart;
element.value = str.substr(0, start) + text1 + str.substr(start, length) + text2 + str.substr(start + length);
} else {
document.post.__xtcomments_msg.value += text1+text2;
}
}
Copy code