How can I assign a function to to show a hidden div using the onLeaveEditMode callback? Right now, when a user clicks the span that initiates the in-place edit field for a category name, additional edit controls are hidden. I'd like to then reveal those controls again either when a user submits changes, or hits the cancel link. I assume the onLeaveEditMode callback covers both those cases, but I can't figure out how to use it having looked at the example.
I've been using Rails helpers to do the in-place edit form, which i currently have working, and have been experimenting with the callback like this. Javascript =========== function editInPlace() { var editor = new Ajax.InPlaceEditor('test_link', 'whatever.com' ); editor.onEnterEditMode = function () { } editor.onLeaveEditMode = function () { alert('testing'); } } HTML ============== <span onClick="editInPlace()" id="test_link">test in-place</span> At this point, I'm just trying to get an alert to show when I hit cancel here, but neither onEnter or onLeave callbacks appear to be working for me. If I can get the alert to show, I'm sure I can get the rest figured out. Any help would be greatly appreciated. Thanks, -A --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---