469,366 Members | 2,286 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,366 developers. It's quick & easy.

createElement and IE on different machines

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
Oct 26 '06 #1
9 1639

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.

Andrew Poulos wrote:
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
Oct 26 '06 #2
Andrew Poulos wrote:
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?

--
Ian Collins.
Oct 26 '06 #3
Fdream wrote:
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
Andrew Poulos wrote:
>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
Oct 26 '06 #4
Ian Collins wrote:
Andrew Poulos wrote:
>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?
Sorry, it's a typo. It's not in the code that works on my machine and
not the client's.

Andrew Poulos
Oct 26 '06 #5
Andrew Poulos wrote:
Ian Collins wrote:
>Andrew Poulos wrote:
>>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?
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.
--
Ian Collins.
Oct 26 '06 #6
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 ?
Oct 26 '06 #7
ASM wrote:
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 ?
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
Oct 27 '06 #8
It sounds like a cache problem ; empty the cache/temporary internet
files (as well as the offline files) and it should work.
Andrew Poulos wrote:
ASM wrote:
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 ?

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
Oct 27 '06 #9
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
Oct 27 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dave | last post: by
3 posts views Thread by Arpan | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.