Skip to content
Related Articles

Related Articles InPlaceEditor loadingText Option
  • Last Updated : 30 Nov, 2020

The library is a cross-browser library that aims at 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 loadingText option is used to specify the text that would be shown when the loadTextURL option is specified and the InPlaceEditor is loading text from the server. The default value when this option is not specified is “Loading…”.


{ loadingText: string }

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

  • string: This is a string that specifies the text to be used. The default value is “Loading…”.

The below example illustrates the use of this option.


The below HTML file demonstrates this with the example:


  <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
          // Script for loading the text
          // Specify the text to be used while loading
          loadingText: 'Text loading from server!'
  <h1 style="color: green">
  <h2>InPlaceEditor loadingText Option</h2>
<p>The "loadingText" option specifies the placeholder
    text to be used when text is being loaded from the 
    server specified using the "loadTextURL" option.</p>
  <div id="editableElement">
    This is the editable element!

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


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

The below loadText.php script 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 :