Re: IFrame.onload, IE and Remote Scripting
- From: ASM <stephanemoriaux.NoAdmin@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 23 Mar 2007 23:10:30 +0100
Tom Cole a écrit :
and there I am creating the iframe
programmatically using this:
iframe = document.createElement('IFRAME');
iframe.width = 0;
iframe.height = 0;
iframe.style.border = 'none';
iframe.id = "internal_frame";
iframe.name = "internal_frame";
iframe.src= "blank.html";
iframe.onload = function() { alert('Something'); };
document.body.appendChild(iframe);
I then load cross-domain requests by setting the src attribute of the
iframe. In opera and FF, I get my little alert box, so I'm good to go
and read the iframe's contents... But in IE, I do not get an alert
box.
With IE do you get the new file in your iframe ?
Probably better result with :
parent.internal_iframe.location = 'my_new_file.htm';
than using setAttribute();
Second of all...what is the best way to obtain the contents of the
iframe (the server response) from the onload event handling function?
I'am not very sure you'll be authorized to get the content of the iframe ...
especially if this content comes from another domain.
nota :
You can also use an 'object' insteed of an 'iframe' to include some html file.
(with much more restrictions about cross domain)
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
.
- Follow-Ups:
- Re: IFrame.onload, IE and Remote Scripting
- From: Tom Cole
- Re: IFrame.onload, IE and Remote Scripting
- References:
- IFrame.onload, IE and Remote Scripting
- From: Tom Cole
- IFrame.onload, IE and Remote Scripting
- Prev by Date: Re: Adjusting typewriter scroller script
- Next by Date: Re: IFrame.onload, IE and Remote Scripting
- Previous by thread: IFrame.onload, IE and Remote Scripting
- Next by thread: Re: IFrame.onload, IE and Remote Scripting
- Index(es):
Relevant Pages
|