3.4 Retrieving code from a form post
Make sure that eWebEditor is placed within a form.
When the form is submitted eWebEditor will behave exactly as if it were a textarea.
In the following example we are going to create a HTML script to display the editor and an ASP script to retrieve the code and display it.
Create a HTML script called 'editor.html' and put the following code in it:
<form name="myform" method="post" action="display.asp">
<input type="hidden" name="content1" value="">
<iframe ID="eWebEditor1" src="/ewebeditor.htm?id=content1&style=coolblue" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe>
<input type="submit" name="btnSubmit" value="Submit">
Create an ASP script and call it 'display.asp' and put the following in it:
Create a PHP script and call it 'display.php' and put the following in it:
Run the first script and you should see the editor displayed. Type up a document in the editor and click 'Submit'. The data will be sent to the second ASP script, which will display it.
In an actual document editing system you would save this data to a database or file rather than displaying it. Please see the example application in the examples folder.