Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

style.display crashing IE 5.5 1

Status
Not open for further replies.

pumpkinapo

Programmer
Dec 10, 2002
16
0
0
US
I seem to be having a problem with setting style.display = "block" though javascript. On IE 5.5 SP2 it will crash the browser, on IE 6.0 it works fine. Here is a sample of the sections of code:

tb.appendChild(myClone);
//alert('' + tb.lastChild.style.display);
tb.lastChild.style.display = "block";
//alert('fail point 12');
if ( (inNo % 2) == 0 )
{
tb.lastChild.style.background = "#EBEBEB";
}

If I uncomment the first alert it will work fine, however the user would get an alert message. When I comment it out, IE 5.5 crashes. The page in question can be found here:


Javascript can be found here:

Line: 128

To execute the function click on the "Add New Entry" button.
Thanks for the help!

Peter Leing
 
I hate to say this, but - BWAHAHAHAHAAAAAA!!!

It looks almost as if you have stumbled upon a bug in IE 5.5 SP2 (perhaps an unchecked buffer???). If it works in IE6, then it "shouldn't" be a problem with 5.5 (to my knowledge anyways :))

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
Thanks AtomicChip. But, is there a way I can work around it, if it is a bug?
 
Nice - Good question and solution. Star for you. You may want to think about writing a quick FAQ for this.

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top