PLEASE NOTE: This is NOT my script. REPEAT. NOT my script. I would LOVE to give credit to the originator, but because I'm a DUFUS, I never made a note of it. I linked to a post on the MT boards that described how to do this, but since the MT board changed servers, that link doesn't even point to the right thread anymore. If you recognize this script as the one you wrote… PLEASE PLEASE tell me so I can give you the credit you're due.
I've been requested a number of times to explain how I do that "preview your comment live" thing…. It's really very simple…
Put this in your head tags somewhere:
<script type="text/javascript" LANGUAGE="Javascript">
<!–
function ReloadTextDiv()
{
var NewText = document.getElementById("DynamicText").value;
var DivElement = document.getElementById("TextDisplay");
DivElement.innerHTML = NewText;
}
//–>
</script>
Where you want the Live Preview to show up, but this:
<span id="TextDisplay"></span>
Inside the textarea tag for your comment text box, add these two attributes:
id="DynamicText" onKeyUp="ReloadTextDiv();"
(so in other words, your tag may look something like this:
<textarea name="text" rows="10" cols="40" id="DynamicText" onKeyUp="ReloadTextDiv();"></textarea>
That should be it… without having the original instructions to reference, I hope I didn't leave anything out. Let me know if you have any troubles implementing it.