Step 239. Library jQuery. The use of expansion modules. Extension library jQuery UI. Form. Widget Jeditable (continued)

In this step, we consider sending data to the server, and removing htmlmarkup.

The material of this step is based on

On the server the data is sent by the method POST:


There is the possibility of renaming the sent parameters. For example, you need to go the next line:


For this you need to add two parameters:

 $(document).ready(function() { $('.edit').editable('', { id : 'elementid', name : 'newvalue' }); }); 

If the contents of the elements of the class edit_area, for example, contains data with markup type Wiki, Markdown, and want to edit only the text in the markup, not the original htmltext content block. For this you can use loadurl, which defines a urlfrom which data is retrieved for editing:

 $(document).ready(function() { $('.edit_area').editable('', { loadurl : '', type : 'textarea', submit : 'OK' }); }); 

In this example load.php should return the contents of the block without the htmlmarkup. However, save.php returns the text with html-markup. After saving, the browser displays the data that is returned to the script save.php. There is another option — you can send the markup in parameter data.

In the next step we will continue to examine this question.

The previous step the Content of the Next step