DomAPI Home
DomAPI
Build: 4.0 BETA
Topic: Elm close/destroy

  contempus registered v3 wrote on Tuesday 9/7/04 at 5:22 AM (PST)  
 

Hi Darin,

Is there a method somewhere to be used for removing/destroying/deleting elms?

I looked through the domapi and elmProto (as well as the Component references, but found no good candidate for such operations.

Or should I just go ahead and use the DOM standard cascaded removal?

Regards,
Ronny

 
    RSS feed of forum  
  Darin Kadrioski registered v4 wrote on Tuesday 9/7/04 at 11:04 AM (PST)  
 

Right now I would recommend using the Elm's remove() method. This deletes all references to it from the domapi object and also removes it from the DOM. There is also an undocumented _free() method, but that is currently only used internally in onunload.

 
    RSS feed of forum  
  DeanL registered v4 wrote on Thursday 11/24/05 at 12:02 PM (PST)  
 

I have a link on my page that creates an elm of iframe type that has a form in the iframe which has a onsubmit function (that does an ajax call). How can I reference the parent iframe elm from the onsubmit called function? All I am trying to do is have the iframe remove once that ajax has been called (so form adds data to db and should then disappear). I am thinking the elm.remove() is the way, but am having trouble referencing. Was going to pass an object reference in the onsubmit function, but wasn't quite sure how to that either. I am passing the 'this' in the onsubmit so I can use the submitted data...

Thanks for your patience.
Dean

 
    RSS feed of forum  
  Darin Kadrioski registered v4 wrote on Thursday 11/24/05 at 12:23 PM (PST)  
 

I believe 'parent' will get you into the scope of the window that contains the iframe Elm. Try parent.elmName.hide() for starters, and play with it from there.

 
    RSS feed of forum  
  DeanL registered v4 wrote on Monday 11/28/05 at 3:26 PM (PST)  
 

Yes, that did work, thx!

 
    RSS feed of forum  
You could respond to this post if you were logged in.
DHTML by www.domapi.com