NicEdit data not in POST
Asked Answered
A

1

5

Im sure im missing something really simple here and i have searched and cant seem to find an answer.

With this simple form. how can i get the content from the NicEdit box to my HTTP POST. All i get is the origional textarea value not the edited verison.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<h2>Test Page</h2>
<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
<script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>
<table class="form">
<form action="test.php" enctype="multipart/form-data" method="POST">
<tr> 
    <td><textarea rows="10" cols="100" name="3">A long time ago in a galaxy far, far away...</textarea></td>
</tr>
<tr>
    <td align="center" style="padding-bottom: 10px;"><input type="submit" onclick="window.scrollTo(0,0)" name="update" value="Save Changes"></td>
</tr>
</form>
</table>
<?
print_r($_REQUEST); 
?>
</body>
</html>
Afc answered 18/9, 2012 at 16:18 Comment(0)
T
17

Look how I solve it:

<textarea id="area1" name="content"></textarea>
<INPUT type=submit name="submit" value="Send" onclick="nicEditors.findEditor('area1').saveContent();">
Tonsillitis answered 23/12, 2012 at 16:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.