When I add onEnterEditMode to Ajax.InPlaceEditor, it seems to function as I would expect, but in the Firefox version 3.0.8 Error Console on Mac Leopard, I get "destination is undefined" for Line 108 in prototype.js version 1.6.0.3 bundled with script.aculo.us version 1.8.2. " destination[property] = source[property];"
1) Should I be returning something in onEnterEditMode to satiate Prototype? Based on code from http://wiki.github.com/madrobby/scriptaculous/ajax-inplaceeditor How to execute custom code using the InPlaceEditor’s callbacks. I do the following: new Ajax.InPlaceEditor(id, url, { onEnterEditMode: function(form, value) { // custom code goes here... alert('onEnterEditMode: form[' + form + '] value[' + value + ']'); }} ); I get an alert like so: onEnterEditMode: form[[object Object]] value[undefined] Notice that the variable "value" is undefined. 2) Is the signature correct? Note also that the earlier example on that page with: callback: function(form, value) { return 'myparam=' + encodeURIComponent(value) } sends my server side script the posted variable "myparam", so I don't see why "value" is undefined for onEnterEditMode. FYI fellow noobs, a little gem I found is that "editorId" is passed in the ajax request and holds the id of the editor. Had this been documented on this page I would not have spent the last 2 days learning more than I ever wanted to know about the innards of Prototype & script.aculo.us. Also, using an id in the body tag did not work in IE, but works in FF and Safari. But you probably wouldn't use it there and I was just testing it there when I started with the InPlaceEditor. "(Should these callback options be documented in the Options list above?)" Yes, please document these options. More clarification on ajaxOptions would have helped me, but I was able to do what I wanted in onComplete. Regards. --~--~---------~--~----~------------~-------~--~----~ 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 prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---