I want to be able to include a template contents into the reply on the click of a button. I have managed to create the code to insert var but I don't know how to edit this to include template instead.
Moving javascript to external file hasn't worked
All help appreciated
Thanks,
PS. This is the code I am currently using... (in head of the newreply template)
HTML Code:
<script>
function insertText() {
var textstring = "test string";
document.getElementById ("{$editorid}_iframe").contentWindow.document.body.innerHTML += textstring;
document.getElementById('vB_Editor_001_textarea').value += textstring;
}
</script>
and the link is...
HTML Code:
<a href="javascript:;" onClick="insertText()">test</a>