Categories
josephscott

AJAX Edit In Place With Prototype (Javascript), Version 0.3.1

Here’s what has changed since 0.3.0:

  • Removed some unnecessary variable checks
  • Add a new option, escape_function.

I looked at adding support for password fields, but it doesn’t seem to make much sense for editing text in place.

The new escape_function option defaults to escape (which is what all previous version of EditInPlace also used), but also supports encodeURIComponent. Adding support for encodeURIComponent was suggested by Peter, because it has better language support. If you do use encodeURIComponent keep in mind that it will add slashes for characters that escape doesn’t. For PHP users that means you need to use stripslashes() on $_POST[“content”] when using encodeURIComponent.

You can download eip-0.3.1.tar.gz and check out the example page to see it action.