Hi

I gave the url as :
http://test-aatetsting.appspot.com
in the gadget and tried accessing the parameter showTeachers in the
pyhton file as:
showTeachers = str(self.request.get('up_showTeachers'))

then i set this showTeachers in the response and try to get the same
in html.
But i am unable to access the showTeachers parameter here. I am not
getting value for it.

And i also tried it by passing the parameter in the url in gadget xml
file.
http://test-aatetsting.appspot.com?up_showTeachers=true

And followed the same procedure in the python and html as mentioned
above.
But its not working.

Please help.

Nishtha

On Jun 25, 4:54 pm, String <[email protected]> wrote:
> HTH,
>
> String
>
> On Jun 24, 11:37 am, Nishtha <[email protected]> wrote:
>
> > I am using showTeachers as a user pref parameter in the gadget. and
> > passing it to content type url as:
>
> > <UserPref name="showTeachers" display_name="Show Teacher"
> > required="true" datatype="bool"/>
> > <Content type="url" href="http://test-aatetsting.appspot.com?
> > param=__UP_showTeachers__">
>
> >http://test-aatetsting.appspot.com:This is the python application i
> > am using.  Here i try to fetch the parameter as the following from the
> > request:
>
> > showTeachers = str(self.request.get('showTeachers'))
>
> The parameters are passed to the target URL prefixed by "up_", as
> documented 
> athttp://code.google.com/apis/gadgets/docs/legacy/reference.html#Reques....
>
> So in your example, you should be using gadget XML like this:
> <UserPref name="showTeachers" display_name="Show Teacher"
> required="true" datatype="bool"/>
> <Content type="url" href="http://test-aatetsting.appspot.com";>
>
> and getting a remote URL (at the server end) 
> like:http://test-aatetsting.appspot.com?up_showTeachers=true
>
> I don't know Python, but guessing at its syntax, I'd think you'd want
> something like:
> showTeachers = str(self.request.get('up_showTeachers'))
>
> > Another thing I read is urlparam attribute to be used for content type
> > url
>
> >http://code.google.com/apis/gadgets/docs/legacy/reference.html#Userpr...
>
> > urlparam = Optional string to pass as the parameter name for content
> > type="url".
>
> > Is this to be used? if so then how?
>
> I've not used urlparam myself, but I think it's optional. If you do
> use it, the API will pass that as the url parameter name instead of
> up_<name>. So for instance, if you defined your gadget XML like this:#
> <UserPref name="showTeachers" display_name="Show Teacher"
> required="true" datatype="bool" urlparam="show_teachers"/>
> <Content type="url" href="http://test-aatetsting.appspot.com";>
>
> your remote URL would then look 
> like:http://test-aatetsting.appspot.com?show_teachers=true
>
> But again, that's just how it looks to me reading the docs, I haven't
> used url parameters like this.
>
> String
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iGoogle 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/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to