PDA

View Full Version : destroy object, make new one



Dster
05-01-2006, 11:25 PM
Hi -

I have a web page with an object (a scrolling textbox) that I want to change due to user input.

Is there a way to destroy the object, and create a new one? That way I can pass the user's information to the constructor.

jscheuer1
05-04-2006, 05:46 AM
You can using the DOM (http://www.w3.org/TR/DOM-Level-2-Core/core.html) (Document Object Model) where elements, treated as nodes of their parents, siblings or even children can be accessed for such purposes and new elements can be created and later appended in a similar fashion but, there are easier ways to get the same effect, though the DOM is sometimes the best. I'd need a better idea of what exactly you were trying to do.