onload does not work in IE7

D

Daniel Loose

Hi,

I am showing a document that contains an element with the id ID in a
newly created popup. The element ID shall get some certain style then
(in my case, I want to change display from none to inline, in order to
show ID; but that's not the point/the problem here) For that purpose,
I define an onload handler after creating the popup. That is we have:

MeinFenster = window.open(url, "width=700");
MeinFenster.focus();
MeinFenster.onload=function(){
MeinFenster.document.getElementById('ID').style.display =
'inline';
}

This works fine in FF. *But not in IE7*: Nothing happens there at all,
as if there would be no onload handler defined. No error message, no
alert when I replace the style command with a debug alert, nothing.

What am I doing wrong? How can I get that to work also in IE? Thanx a
ton! D.

PS Note, without onload handler it cannot work at all since ID does
not yet exist directly after opening the popup.

*************

Marty - it's perfect! You're just not thinking fourth dimensionally!
[Emmett "Doc" Brown]

If you wish to email me, please use newsreply at wuwei minus webservices dot de
 
G

GArlington

Hi,

I am showing a document that contains an element with the id ID in a
newly created popup. The element ID shall get some certain style then
(in my case, I want to change display from none to inline, in order to
show ID; but that's not the point/the problem here) For that purpose,
I define an onload handler after creating the popup. That is we have:

MeinFenster = window.open(url, "width=700");
MeinFenster.focus();
MeinFenster.onload=function(){
MeinFenster.document.getElementById('ID').style.display =
'inline';

}

This works fine in FF. *But not in IE7*: Nothing happens there at all,
as if there would be no onload handler defined. No error message, no
alert when I replace the style command with a debug alert, nothing.

What am I doing wrong? How can I get that to work also in IE? Thanx a
ton! D.

PS Note, without onload handler it cannot work at all since ID does
not yet exist directly after opening the popup.

*************

Marty - it's perfect! You're just not thinking fourth dimensionally!
[Emmett "Doc" Brown]

If you wish to email me, please use newsreply at wuwei minus webservices dot de

Try to give different id to your element - myID ?
 
D

Daniel Loose

|
|Try to give different id to your element - myID ?

Well actually in real life the id IS something else than ID ( I think
simply "V"), I only chose ID in the posting for abstraction. (I will
try another id anyhow, but not optimistic...)

*************

Marty - it's perfect! You're just not thinking fourth dimensionally!
[Emmett "Doc" Brown]

If you wish to email me, please use newsreply at wuwei minus webservices dot de
 
S

SAM

Daniel Loose a écrit :
Hi,

I am showing a document that contains an element with the id ID in a
newly created popup. The element ID shall get some certain style then
(in my case, I want to change display from none to inline, in order to
show ID; but that's not the point/the problem here) For that purpose,
I define an onload handler after creating the popup. That is we have:

MeinFenster = window.open(url, "width=700");
MeinFenster.focus();
MeinFenster.onload=function(){
MeinFenster.document.getElementById('ID').style.display =
'inline';
}

This works fine in FF. *But not in IE7*:

and doing like that :

MeinFenster = window.open(url, "width=700");
MeinFenster.onload=function(){
MeinFenster.document.getElementById('ID').style.display = 'inline';
}
MeinFenster.focus();

or :

function popIdInline( {
MeinFenster.document.getElementById('ID').style.display = 'inline';
}
MeinFenster = window.open(url, "width=700");
MeinFenster.onload= 'openener.popIdInline()';
MeinFenster.focus();
 

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

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top