Scriptaculous in place editor cancel

Hi,

I am playing with Ajax.InPlaceEditor
I hide some elements in editMode:function(id){
$('some-element').hide()
}
So when I click on edit, 'some-element' is hidden.
But when I click on 'cancel', I want to show the 'some-element'.

How can I do this?
Thanks in advance!

yumiu

Hi,

I am playing with Ajax.InPlaceEditor
I hide some elements in editMode:function(id){
$('some-element').hide()}

So when I click on edit, 'some-element' is hidden.
But when I click on 'cancel', I want to show the 'some-element'.

How can I do this?

Hi, you might want to look at the invoking the show() method when
you click cancel. I would recommend consulting your Prototype
or JQuery for further details.

Good luck,

-Conrad

I figured it out by adding a onLeaveEditMode: showSomeElement() in
options.

It looks to me that onLeaveEditMode will be called in destroy and wrapUp
and thus will be called after save or cancel.

Can someone help me to confirm this?

Thanks!

yumiu
Conrad Taylor wrote:

Hi

      Is $('some-element').toggle you are looking?(Not sure)

Sijo