Hello, I have three elements and i need initialize editor on all of them in same time. Already made that when user clicks External Control element, editor initializes on all elements i need. But now stuck with saving them.
I've removed Ok and Cancel buttons/links for all fields. Now i need to make one button to save all three fields. I hope you understood situation. problem is that i can't find how to trigger onSave function for element. There is code example: var LinkEditor = Class.create(); LinkEditor.prototype = { initialize: function(data) { this.data = data; }, start: function() { this.editor1 = new Ajax.InPlaceEditor( 'editurl_'+this.data.itemnr, 'ajaxrequest.php', { externalControl: 'editcontrol', externalControlOnly: 'true', okControl: false, cancelControl: false, callback: function(form, value) { return 'url=' + encodeURIComponent(value) } }); this.editor2 = new Ajax.InPlaceEditor( 'editdescrip_'+this.data.itemnr, 'ajaxrequest.php', { externalControl: 'editcontrol', externalControlOnly: 'true', okControl: 'false', cancelControl: 'false', callback: function(form, value) { return 'descrip=' + encodeURIComponent(value) } }); this.editor3 = new Ajax.InPlaceEditor( 'editdescrip_'+this.data.itemnr, 'ajaxrequest.php', { externalControl: 'editcontrol', externalControlOnly: 'true', okControl: 'false', cancelControl: 'false', callback: function(form, value) { return 'descrip=' + encodeURIComponent(value) } }); }, addsave: function() { Insertion.After('description'+this.data.itemnr, '<span id="saveit"><br><input type="button" name="save" value="Save" onclick="editor'+this.data.itemnr+'.finish()"></span>'); }, //this function is executed by global save button for all fields. finish: function() { this.editor1.onSave() //doesnt work $('saveit').remove(); } } Respectfully, Darius Tumas (a.k. Tokeiito) mob.: +370 631 13666 www.tokeiito.eu --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@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-core?hl=en -~----------~----~----~----~------~----~------~--~---