There's an example on the IPE Wiki page showing exactly how to do  
this. It's pretty simple -- you store a reference to the editor, then  
call its dispose() method when you're done with it.

Here's a clip from a working instance, although this is quite old and  
may have some 1.5 weirdness in it.

        var editor = new Ajax.InPlaceEditor(
                        callback: function(form,value){
                        /* do something here to identify what you're editing*/
                        ajaxOptions: {
                                onComplete: function(){


On May 8, 2009, at 11:11 AM, mtm81 wrote:

> Hi,
> I need several inplaceeditors on the screen, therefore I've included
> the inplaceeditor code into a function so that each instance is only
> generated when the user actually clicks the button to edit..
> However if I click cancel on that instance and then click to edit
> again, the previous instance still shows so I end up with a doubled up
> inplace text box/select box.
> I know I simply need to destroy the previous version on either sucess
> or cancellation.
> Here's my current function.. how do I amend this to destory it??
> thanks loads for any replies...
> mtm81
> function addnewselect(CategoryID) {
> new Ajax.InPlaceSelect('details_defaultnominal_' + CategoryID,
> 'includes/inc_editinplace_process.asp', [<%=NominalArray_Values%>], [<
> %=NominalArray_Names%>], {callback: function(value,text) { return
> 'UpdateFieldName 
> = 
> NominalCode 
> &UpdateTblName 
> = 
> Suppliers_Products_Categories 
> &UpdateUniqueIDName=CategoryID&UpdateUniqueID='
> +CategoryID +'&UpdateValue='+escape(value)}, cancelControl:'button',
> highlightcolor: 'transparent'});
> }
> >

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to