Ning Developer Docs

I am trying to test my application, which is working in Orkut. Good surprise that it not showing any syntax errors. But both in profile and canvas mode it is shown with fixed height nearly 100px. I was not able to increase its height with any method - either adding height = "500" in the header or using gadgets.window.adjustHeight().
Any clues?
My 'Require' settings are as follows.
Require feature="opensocial-0.7"
Require feature="dynamic-height"
Require feature="views"
Require feature="tabs"



Thanks
Jevs

Views: 11

Replies to This Discussion

Hi,

I am also facing the same problem, Any Solution?

Thanks
Sharath
I found soultion: gadgets.window.adjustHeight(600);
It seems that for Ning canvas height should be fixed.
Happy coding
Hello,

Thanks for posting the solution.
where exactly you insert the code line gadgets.window.adjustHeight(600); ?

Thanks
Sharath
Hi,
You have to place it af the end of the script when showing canvas or profile for the first time. Certainly you can change 600 to other height and use different values for canvas end profile. Not tried, but probably you can change height more than once.
It looks that Ning implementation is exactly same as for Orkut, except gadgets.window.adjustHeight(); not working.
Cheers
Hello,

I tried its working.
Thanks for the reply.

Sharath
Hello,
I found an example of the code used in an example called "Managing Gadget Height"
http://code.google.com/apis/gadgets/docs/ui.html

I am wondering how could I put it in the file so it will adjust the height as soon as it loads.
Would it be a javascript onload? Is there an example of the code I could see?

Thanks
Hi JR:

In our tutorials page:
http://developer.ning.com/notes/Ning_OpenSocial_Application_Tutorials

We were able to get gadgets.window.adjustHeight(); to work shortly after you output your HTML via innerHTML. Do a search for adjustHeight on that page and there should be a couple of good examples there!

Thanks, Ernie
Great! thanks for the tips,
I'm going to check it out right now,
Cheers =)
Thanks for the tip Ernie. It seems to stretch it to 600px (by looking quickly). What if your canvas stretches further down than this? Right now when I added the code it cuts off the content (no Scroll bars, etc). Is there anyway to make it dynamic but also to include all of the content? Thanks!
What if I'm suing URL content type? How can I adjust height?
I'm also interested in knowing how to adjust the height of a gadget using the URL content type - anybody know how to accomplish this?
Hi Bob,

Can you confirm with me that you've tried the adjustHeight() method within the JS section of URL itself after rendering HTML and it still doesn't readjust the height properly?

If not, I'll send another note to developers and try to escalate the issue. Thanks for the heads-up!

- Ernie

RSS

© 2026   Created by Ning Developer Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service