Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NicEdit data not in POST

Tags:

html

php

nicedit

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>
like image 385
Steve Taylor Avatar asked Sep 18 '12 16:09

Steve Taylor


1 Answers

Look how I solve it:

<textarea id="area1" name="content"></textarea>
<INPUT type=submit name="submit" value="Send" onclick="nicEditors.findEditor('area1').saveContent();">
like image 62
Vedmant Avatar answered Sep 28 '22 15:09

Vedmant