It can represent the arguments that were passed to your gadget, just in case
some implementation could be:
function getParam(paramName) {
var url = window.location.href;
var paramStart = url.indexOf(paramName);
if (paramStart == -1) {
return '';
}
var paramEnd = url.indexOf('&', paramStart);
if (paramEnd == -1) {
paramEnd = url.length;
}
var param = url.substring(paramStart, paramEnd);
var valueIndex = param.indexOf('=');
if (valueIndex == -1) {
return '';
}
return param.substring(valueIndex + 1);
}
then you can do getParam('mode')
On Nov 14, 2007 4:30 PM, codewarrior415 <[EMAIL PROTECTED]> wrote:
>
> Can we get more info on _args()?
> Are there any documentation on what this array holds?
>
> On Nov 13, 9:39 am, "Arne Roomann-Kurrik (Google)"
> <[EMAIL PROTECTED]> wrote:
> > Currently you can get the full profile URL in Orkut using the
> > following code:
> >
> > _args()["parent"] +
> > person.getField(opensocial.Person.Field.PROFILE_URL);
> >
> > Like Paul said, though, this is a temporary solution - I expect that
> > the returned path will change in the future, or there will be a method
> > to resolve the path automatically.
> >
> > ~Arne
> >
> > On Nov 13, 7:27 am, Paul Lindner <[EMAIL PROTECTED]> wrote:
> >
> > > Arne from Orkut mentioned that they would make the response for
> > > PROFILE_URL into absolute URLs in the future.
> >
> > > On Tue, Nov 13, 2007 at 12:24:49PM -0300, Ignacio Blanco wrote:
> > > > Hi
> >
> > > > You should concatenate: synd (parameter) + getField(
> > > > opensocial.Person.PROFILE_URL)
> >
> > > > Regards,
> >
> > > > Ignacio.
> >
> > > > On Nov 13, 2007 12:00 PM, sergi <[EMAIL PROTECTED]> wrote:
> >
> > > > > How to generate profile's url for a user for any OS container?
> > > > > Orkut's getField(opensocial.Person.PROFILE_URL) returns url
> without
> > > > > hostname :(
> >
> > > --
> > > Paul Lindner
> > > hi5 Architect
> > > [EMAIL PROTECTED]
> >
> > > application_pgp-signature_part
> > > 1KDownload
>
>
> >
>
--
Situation Number one
Its the one that's just begun
But evidently its too late
Situation Number two
Its the only chance for you
It's controlled by denisons of hate
Situation Number three
It's the one that no one sees
All too often dismissed as fate
Situation Number four
The one that left you wanting more
Tantalized you with its bait - Jack Johnson
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenSocial API Definition (was OpenSocial Developers)" 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-api?hl=en
-~----------~----~----~----~------~----~------~--~---