It sounds like you're running into a cross-domain issue. Because the
page loaded in your IFrame is hosted on a different domain than the
containing page, the browser won't let you call certain methods or set
certain properties on the containing window -- you'll get a
"Permission denied" error instead.

In general, building a client-side OpenSocial application in this way
is a losing strategy -- even if you can get owner and friend
information into the IFrame at load time, your application won't be
able to post activities in response to a user action or otherwise
interface with the OpenSocial API, defeating the purpose of building a
social application in the first place. I suggest waiting for the REST-
based API (which is coming with support for OpenSocial 0.8) or
implementing your server-side business logic in JavaScript (e.g.
random friend selection) -- your server can still come in handy if you
need to store information in or retrieve information from your
database, which you can do a call to the client-side
gadgets.io.makeRequest method.

Let me know if you have any other questions.

- Jason

On Jun 23, 6:24 am, krishna chaitanya <[EMAIL PROTECTED]>
wrote:
> Hi
>
> Issue:
> ====
> Not able to execute a javascript method from serverside code.
>
> window.parent.executeMethod()
>
> or
>
> top.executeMethod()
>
> in the server side code is returning permission denied error. (Was
> able to find the error message using firefox webdevloper extension.
> Otherwise page displayes blank html)
>
> Requirement
> ==========
> In  orkut application I can fetch all the friends of the owner.
> Now my server will randomly decide a friend.  I want to display
> that random friend image in the page.
>
> [Please refer tohttp://developer.apple.com/internet/webcontent/iframe.html
> for remote scripting strategy.]
>
> I am calling the serverside php in an iframe. So I won't have access
> to the iframe innerHTML.
>
> This is why I am trying to call a method in client javascript code
> from the server side. This is giving permission denied error.
>
> Any workarounds for this issue.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to [email protected]
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