N
Neil Cherry
First, no I'm not much of a Javascript programmer.
Basically I have a textarea that I'm entering text in. I have a
javascript function called preview. When I enter new text and send the
preview(document.getElementById('elm1')).innerHTML) I get the text
before the changes have been made. How do I get the current changed
text from the text area. Here's the html portion:
<form method="post">
<input type="hidden" name="edit" value="true">
<input type="hidden" name="modify" value="false">
<input type="hidden" name="id" value="">
<input type="text" name="title" value="Title">
<textarea class="text" cols="80" rows="20" id="elm1" name="content" WRAP="PHYSICAL">
...
</textarea>
<input type="submit" value="save">
<input type="submit" value="preview"
onclick="preview(document.getElementById('elm1')).innerHTML);return false;">
<input type="hidden" name="modify" value="true"/>
<input type="submit" value="edit" />
</form>
Preview is defined as this:
function preview(str) {
alert("Text" + str);
}
Thanks!
Basically I have a textarea that I'm entering text in. I have a
javascript function called preview. When I enter new text and send the
preview(document.getElementById('elm1')).innerHTML) I get the text
before the changes have been made. How do I get the current changed
text from the text area. Here's the html portion:
<form method="post">
<input type="hidden" name="edit" value="true">
<input type="hidden" name="modify" value="false">
<input type="hidden" name="id" value="">
<input type="text" name="title" value="Title">
<textarea class="text" cols="80" rows="20" id="elm1" name="content" WRAP="PHYSICAL">
...
</textarea>
<input type="submit" value="save">
<input type="submit" value="preview"
onclick="preview(document.getElementById('elm1')).innerHTML);return false;">
<input type="hidden" name="modify" value="true"/>
<input type="submit" value="edit" />
</form>
Preview is defined as this:
function preview(str) {
alert("Text" + str);
}
Thanks!