On Tue, Apr 27, 2010 at 13:25, orensol <
or...@triond.com> wrote:
> It seems to work for me as well, however sometimes (usually after a
> ctrl+f5 refresh) after the first alert ("Hello world from pmrpc
> client!") I get the "Application error. Destination unavailable."
> alert instead of the expected "Hello!".
>
> Sometimes I do get the "Hello!" though.
>
> In my code it works as expected when the iframe is from same domain,
> but doesn't work at all when the iframe is from a different domain.
OK, this rules out the cross-origin issue. From the looks of things,
I'd say there's a strange timing issue happening due to (possibly)
dynamic loading of pmrpc and different load times of windows/frames
from different domains.
Is there any chance you can give me the exact code you're trying to
get working so that I can debug the exact case? (without the
application logic, of course). I myself cant reproduce the error by
hitting ctrl-f5 or ctrl-R so it must be something else.
Also, can you try adding the pmrpc.call inside a setTimeout so that it
gets called after 1-2 seconds after it does now?
> I am not sure how I can proceed from here. When debugging with
> firebug, it seems that when iframe is not from same domain I have
> destination as "Window undefined" but when on same domain, destination
> is "Window 377" (with 377 being the end of the url "
blah.com/post/
> 377").
That's strange... for me, it always returns a valid Window reference,
no matter if it on the same domain or not.
Ivan