IE don't refresh DOM after <DIV> removing

C

Chantal

Hello everybody,

I'm relatively new to javascript + DOM so I've a question :

I'm removing <div> elements in DOM with javascript.
It works perfectly in Firefox and Opera : I mean the DOM is refreshed
automatically and I see the changes.

But in IE (version 6), I don't see any changes. Do I have do to
something more with IE to tell "him" to refresh the DOM.

If you want more details. I'm using the wz_jsgraphics.js library.
This library add DIV tag to draw shapes.

I modified the clear function by just removing the added DIV. And it
works perfectly on FF and Opera but
on IE the DOM doesn't seem to be refreshed.
So, what can i do to get the DOM refreshed in IE ?

Thanks in advance,

Chantal
 
E

Evertjan.

Chantal wrote on 09 feb 2006 in comp.lang.javascript:
I'm relatively new to javascript + DOM so I've a question :

I'm removing <div> elements in DOM with javascript.
It works perfectly in Firefox and Opera : I mean the DOM is refreshed
automatically and I see the changes.

But in IE (version 6), I don't see any changes. Do I have do to
something more with IE to tell "him" to refresh the DOM.

If you want more details. I'm using the wz_jsgraphics.js library.
This library add DIV tag to draw shapes.

I modified the clear function by just removing the added DIV. And it
works perfectly on FF and Opera but
on IE the DOM doesn't seem to be refreshed.
So, what can i do to get the DOM refreshed in IE ?

Why not simply make a <div> display:none; ?
 
C

Chantal

Hi Evert-Jan,

Because I really need to remove the DIV elements.

Loot at http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm to
understand what I mean.

;o)

Btw, IT WORKS NOW on my 3 browsers.

In fact, IE, I don't know why, refused to add a ID to my DIV elements
in my function.

So, my deleting function was looking this ID and didn't found it with
IE.
So, now I only test the NodeName of the element.
I'm lucky enough to have only "DIV to remove" in my childnodes and not
some to preserve.

This IE DOM inspector helped me a lot to find the problem :
http://www.cheztabor.com/IEDocMon/

Thanks,

Chantal
 
T

Tony

Chantal said:
Hi Evert-Jan,

Because I really need to remove the DIV elements.

Loot at http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm to
understand what I mean.

Better yet, why not post the offending code?
In fact, IE, I don't know why, refused to add a ID to my DIV elements
in my function.

I have never experienced that problem - therefore, I suspect it may be
in the way you were declaring the ID property. Post the code and we can
see.

OTOH, if it works & you're satisfied, don't bother :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top