>So how can RPC to another domain be done?
On the server.
(sorry for the 'top' post)
"Tom Cole" <tcole6@gmail.comwrote in message
news:1174688630.322582.58580@b75g2000hsg.googlegro ups.com...
On Mar 23, 6:10 pm, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
Quote:
Tom Cole a écrit :
Quote:
and there I am creating the iframe
programmatically using this:
>
Quote:
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);
>
Quote:
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();
I have no problem loading the page(s), the only issue is that the
function declared in this line:
iframe.onload = function() { alert('Something'); };
never gets executed in IE, although it executes perfectly after
loading in Opera and in Firefox.
Quote:
>
Quote:
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.
That's what I'm experiencing, I'm getting security exceptions in Opera
and in Firefox. So how can RPC to another domain be done?
My situation is that I have one business that is hosting several
websites with products for specific industries. But at the end of the
day all the orders are processed the same and arrive in the same
system. I can reuse the same base of servlets to accept and process
all the orders without having to concern myself with making sure X
websites all have the latest version of a servlet.
Quote:
>
nota :
You can also use an 'object' insteed of an 'iframe' to include some html
file.
(with much more restrictions about cross domain)
Thanks.
<snip>