D'oh, of course.
Sorry for the noob question ;-)

- Johannes

On Apr 24, 8:47 pm, "Arne Roomann-Kurrik" <[EMAIL PROTECTED]>
wrote:
> Hi Johannes,
>
>    Yes, browsers will limit access between IFRAMEs that are running on
> different domains.  After the POST takes place, you won't have access to the
> IFRAME body.
>
> ~Arne
>
>
>
> On Thu, Apr 24, 2008 at 2:18 AM, jfahrenkrug <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have a file upload form in my gadget and it's target is an iframe
> > within my gadget:
>
> > <form id="upload_form" action="http://MY_SERVER"; method="POST"
> > enctype="multipart/form-data" target="upload_target_iframe">
> > ......
> > </form>
>
> > <iframe src="about:blank" id="upload_target_iframe"
> > name="upload_target_iframe" onload="uploadFinishedCallback();"></
> > iframe>
>
> > this is what the callback looks like:
>
> > function uploadFinishedCallback() {
> >    console.log('uploadFinishedCallback');
>
> >    var i = $('#upload_target_iframe')[0];
>
> >    console.dir(i);
>
> >    if (i.contentDocument) {
> >        var d = i.contentDocument;
> >    } else if (i.contentWindow) {
> >        var d = i.contentWindow.document;
> >    }
>
> >    if (d.location.href == "about:blank") {
> >        return;
> >    }
>
> >    alert(d.body.innerHTML);
> > }
>
> > When the gadget first loads, uploadFinishedCallback() is executed
> > because of the onload attribute in the iframe. That's OK because the
> > d.location.href == "about:blank" condition is true and so the function
> > returns.
>
> > When I upload a file, however, the callback is called again (which is
> > what I want), but then exceptions are thrown when I access d.location
> > or d.body: access was denied to read the HTMLDocument.location
> > property.
>
> > So is it generally forbidden to access iframes that I build myself via
> > JavaScript?
>
> > - Johannes
>
> > --
> >http://blog.springenwerk.com
>
> --
> OpenSocial IRC - irc://irc.freenode.net/opensocial
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to opensocial-orkut@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to