Connecting Tech Pros Worldwide Forums | Help | Site Map

IE don't refresh DOM after <DIV> removing

Chantal
Guest
 
Posts: n/a
#1: Feb 9 '06
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


Evertjan.
Guest
 
Posts: n/a
#2: Feb 9 '06

re: IE don't refresh DOM after <DIV> removing


Chantal wrote on 09 feb 2006 in comp.lang.javascript:
[color=blue]
> 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 ?[/color]

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


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Chantal
Guest
 
Posts: n/a
#3: Feb 9 '06

re: IE don't refresh DOM after <DIV> removing


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

Tony
Guest
 
Posts: n/a
#4: Feb 9 '06

re: IE don't refresh DOM after <DIV> removing


Chantal wrote:[color=blue]
> 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.[/color]

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

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 :)

Closed Thread