Can you link me to the ASP.NET tools you mentioned? I'm not familiar
with any ASP-specific OpenSocial resources that can help you achieve
what you're after.
As far as the dynamic IFrame URL solution I proposed above, it works a
bit like this:
1. Declare an IFrame in your Content element: <iframe id="appFrame"></
iframe>
2. Declare an on-load handler that requests any data you want to
display inside of your app:
gadgets.util.registerOnLoadHandler(onLoad);
function onLoad() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER),
'owner');
req.send(callback);
};
3. In the callback function, set the source URL of the IFrame, passing
in the data you want to display as a URL argument. For example, in the
callback below, I've passed the owner's name through the URL, and your
ASP.NET page can then get this name and display it as it builds the
page that gets rendered.
function callback(data) {
var owner = data.get('owner').getData();
var appFrame = document.getElementById('appFrame');
if (owner) {
appFrame.src = 'http://www.mydomain.com/app.aspx?ownerName=' +
encodeURIComponent(owner.getDisplayName);
}
};
Keep in mind that this should work fine for data where the length is
generally known (e.g. the name which typically won't exceed 25
characters), but this isn't a good approach if you want to display the
user's friends since you won't be able to fit 100 friend names in the
URL and having several hundred friends is not uncommon.
I hope this helps -- let me know if you have more questions on this.
- Jason
On Aug 18, 4:51 pm, "Jagadeep KC" <[EMAIL PROTECTED]> wrote:
> Dear Jason,
> Thanks,
>
> ASP.Net Tools avilable for other Opensocial website.. is sandbox have any ?
> and I would like to get details for "....IFrame's URL dynamically, passing
> the data as URL arguments..." hope it can be impliment only on
> pagelode_event and not in any other event..?
>
> regards
> kcjagadeep
>
> On 8/19/08, Jason <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > You have several options here:
>
> > 1. The easiest option is to request all of the data that you'll need
> > (name, ID, friends, etc.) and set the IFrame's URL dynamically,
> > passing the data as URL arguments to the IFrame's source URL. This
> > approach is flawed in several respects, however. First, URLs are
> > length-constrained. If a user has a large number of friends, you won't
> > be able to pass all of their information to your ASP.NET page. Second,
> > even if you are able to pass this information to your ASP.NET page,
> > you are limited in your interaction with the OpenSocial API. For
> > example, you won't be able to create a new orkut update in response to
> > an interaction within the IFrame.
>
> > 2. A REST-based OpenSocial API is coming very shortly which will allow
> > you to access all of a user's information in just about any language
> > you please. It has been a long time coming but it is just about ready,
> > so you may want to wait for this.
>
> > 3. A gadgets.rpc library is available for making remote procedure
> > calls to any given container, enabling you to define JavaScript
> > functions in your XML spec that can be triggered from within your
> > ASP.NET page. Unfortunately, there isn't very much documentation on
> > this although we hope to release an article on the wiki soon.
>
> > Please let me know if you have any questions on any of the methods
> > I've proposed above.
>
> > - Jason
>
> > On Aug 14, 1:54 pm, "Jagadeep KC" <[EMAIL PROTECTED]> wrote:
> > > Hai Arne,
>
> > > Thanks that I will try,
>
> > > And i am using IFRAME tage to display the page from my URL..
> > > and also i am using the Java Scripts for getting friends details.. but
> > > how can i integrate it..
> > > where I have to use Javascrips inside the IFRAME or Out side the
> > > IFRAME .
> > > I tried both.. but not getting outputs..
>
> > > that same coed working with xml.. I want to get access the pictures
> > > from outside url..
> > > and do activity with friends details..
>
> > > this process should do with out Javascript, In VB/C#..
>
> > > Hope u understood my question.. ?
>
> > > regards
> > > kcjagadeep
>
> > > On Fri, Aug 15, 2008 at 1:22 AM, André Diniz <[EMAIL PROTECTED]> wrote:
>
> > > > Hi Jagadeep!
>
> > > > Take a look in makeRequest method to change datas, following a link:
>
> > > >http://code.google.com/apis/opensocial/docs/0.7/devguide.html#Remote_.
> > ..
>
> > > > Cheers,
>
> > > > André Diniz
> > > > Enquete Fácil - Owner
>
> > > --
> > > "How you do a thing is more important than what you do." —Amma
>
> --
> "How you do a thing is more important than what you do." —Amma
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---