Skip to content
Related Articles

Related Articles InPlaceEditor loadTextURL Option
  • Last Updated : 27 Nov, 2020

The library is a cross-browser library that aims to improving the user interface of a website. The Ajax.InPlaceEditor is used to make elements editable thereby allowing the user to edit the content on the page and submit the changes to the server.

The InPlaceEditor loadTextURL option is used to specify the URL of the server from where the text would be loaded when the editable element is interacted upon. This is useful when the text on the server is formatted and required to be loaded in the editable element.


{ loadTextURL: URL }

Value: This option has a single value as mentioned above and described below:

  • URL: This is a string that specifies the URL to be used for loading the text. The default value is null.

The below example illustrates the use of this option.

Example: The example demonstrates the InPlaceEditor loadTextURL option.


<!DOCTYPE html>
    <script type="text/javascript" 
    <script type="text/javascript" 
        src="scriptaculous.js?load = controls">
    <script type="text/javascript">
        window.onload = function () {
            new Ajax.InPlaceEditor(
                // Script for the functioning
                // of the editor
                    // Specify the script from 
                    // where the text would be 
                    // loadec
    <h1 style="color: green">
    <h2>InPlaceEditor loadTextURL Option</h2>
        The "loadTextURL" option is used to 
        specify the URL of the server from 
        where the text would be loaded when 
        the editable element is interacted 
    <div id="editableElement">
        Click this element to edit it!

The file inplace.php is required to simulate the saving of data to the server.


  if( isset($_REQUEST["value"]) ) {
    $str = $_REQUEST["value"];
    echo $str;

The file loadText.php is required to simulate the server from where the text would be loaded.


  // Sleep is used to simulate the delay of
  // the server request 
  echo "This is the text from the server!";


My Personal Notes arrow_drop_up
Recommended Articles
Page :