Click to See Complete Forum and Search --> : removing written code ...


Ibanez97
12-31-2002, 11:47 AM
I'm working on an interface that on the click of a button opens a div that appears as a window in the browser (like any Windows based program). I'm able to do this with success and I can "minimize" the div by just changing the style to hidden. What I am wanting to be able to do however, is "close" the div. I realize I need to rewrite everything on the page the way I did to create the div but, I'm not sure how to write all the dynamic content in the browser (everything the JavaScript wrote earlier) except for the specific content in the div requested to be "closed". Does anyone have any knowledge of some examples? I'm not all that familiar with JavaScript and this is my first big project working with it so no examples or tutorials anyone has will be trivial. Thanks.

khalidali63
12-31-2002, 11:56 AM
If I understood your question correctly,then look into the
divIdName.innerHTML = ""
it should replace anything written in between the related div tag

hope that points to some solution

Khalid

Ibanez97
12-31-2002, 12:01 PM
I'm doing that when I create it. Where I run into problems is that I have several different div that open with unique names. so I need to get back all of the divs I wan't to leave on the screen and only get rid of one specific div on the click of a button that is residing inside of that div.

Ibanez97
01-02-2003, 09:50 AM
I know that I'm going to have to get everything that is written already so that it rewrites it. I'm just not sure how to get everything except for the div that I want to get rid of. Does anyone have any suggestions?