NicEdit data not in POST

2019-04-29 07:53发布

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>

标签: php html nicedit
1条回答
小情绪 Triste *
2楼-- · 2019-04-29 08:33

Look how I solve it:

<textarea id="area1" name="content"></textarea>
<INPUT type=submit name="submit" value="Send" onclick="nicEditors.findEditor('area1').saveContent();">
查看更多
登录 后发表回答