createElement and IE on different machines

A

Andrew Poulos

When I run the following code in FF 1.5 and 2, and IE 6 on my computer
the table and image appears. When I run it on the client's XP machine it
appears under FF 1.5 but under IE 6 the window is blank but IE appears
to be in some sort of loop (after about 10 seconds I get the 'not
responding' message in the title bar and have to close IE).

What is it that causes it to behave differently on different computers?

var t = document.createElement("TABLE");
t.id = "txt0";
t.style.width = "200px";
var b = document.createElement("TBODY");
var r = document.createElement("TR");
var d = document.createElement("TD");
c.style.height = "145px";

var myimg = document.createElement("IMG");
d.appendChild(myimg);
myimg.src = "images/mm.png";
r.appendChild(d);
b.appendChild(r);

var r = document.createElement("TR");
d = document.createElement("TD");
d.style.textAlign = "center";
d.style.paddingTop = "4px";
d.style.paddingLeft = "38px";
d.style.fontWeight = "bold";
var txt = document.createTextNode("item");
d.appendChild(txt);
r.appendChild(d);

b.appendChild(r);
t.appendChild(b);
document.body.appendChild(t);


Andrew Poulos
 
F

Fdream

when i chaged this line:
c.style.height = "145px";
to :
d.style.height = "145px";

it plays well under FF 2 & IE 6 on my XP machine.
 
I

Ian Collins

Andrew said:
When I run the following code in FF 1.5 and 2, and IE 6 on my computer
the table and image appears. When I run it on the client's XP machine it
appears under FF 1.5 but under IE 6 the window is blank but IE appears
to be in some sort of loop (after about 10 seconds I get the 'not
responding' message in the title bar and have to close IE).

What is it that causes it to behave differently on different computers?

var t = document.createElement("TABLE");
t.id = "txt0";
t.style.width = "200px";
var b = document.createElement("TBODY");
var r = document.createElement("TR");
var d = document.createElement("TD");
c.style.height = "145px";
What is c?
 
A

Andrew Poulos

Fdream said:
when i chaged this line:
c.style.height = "145px";
to :
d.style.height = "145px";

it plays well under FF 2 & IE 6 on my XP machine.

Sorry, that was a typo on my part and not part of the original code that
works on my IE 6 XP machine but not on the client's.

Andrew Poulos
 
I

Ian Collins

Andrew said:
Sorry, it's a typo. It's not in the code that works on my machine and
not the client's.
If you want help with code that doesn't work, post it. Copy and paste
rather than retype.
 
A

ASM

Andrew Poulos a écrit :
the original code that
works on my IE 6 XP machine but not on the client's.

that even works with my old IE Mac !
what kind of PC has your client ?

Perhaps he has not the image on his HD ?
 
A

Andrew Poulos

ASM said:
Andrew Poulos a écrit :

that even works with my old IE Mac !
what kind of PC has your client ?

Perhaps he has not the image on his HD ?

The client has a two year old XP machine.

Thanks but I tested for the images by:
- doing an alert on the src
- checking the images are where they're supposed to be
- double-clicking the images to make sure they open

I copied the folder onto a USB stick and moving it to my computer and it
worked. I don't know what else to do to get this to work on the client's
computer :-(

Andrew Poulos
 
Y

Yanick

It sounds like a cache problem ; empty the cache/temporary internet
files (as well as the offline files) and it should work.
 
A

ASM

Yanick a écrit :
It sounds like a cache problem ; empty the cache/temporary internet
files (as well as the offline files) and it should work.

can try to reload the file (with button in tool bar)

or change the name of the file to open
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top