This is a small piece of javascript that reads al SPAN tags, checks if it has class="editText" and an id=.

If that is true, it adds a onclick fs if it has class="editText" and an id=.

If that is true, it adds a onclick function. That onclick function will create a textfield or input (depending on the size of the editable text).

Someone has the ability to edit the field. When the text field is blurred, it will read the contents, and starts a XMLHttpRequest and ‘sends’ the content + fieldname + any set vars to an update file. That file will update your database, and reply with the newly set text and the textfield will dissapear again.

This is a very simple script which only works with span tags. Text from the span html tag is sent to update.php which process the request. Plain html is returned from the server and this result populates the span.


Download from: Homepage




Author:
admin
Time:
Friday, May 23rd, 2008 at 11:01 am
Category:
Text Editors, Text Management
Comments:
You can leave a response, or trackback from your own site.
RSS:
You can follow any responses to this entry through the RSS 2.0 feed.
Navigation:

Leave a Reply