Ning Developer Network

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

Share Twitter

Reply to This

Replies to This Discussion

Hi,

I am also facing the same problem, Any Solution?

Thanks
Sharath

Reply to This

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

Reply to This

Hello,

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

Thanks
Sharath

Reply to This

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

Reply to This

Hello,

I tried its working.
Thanks for the reply.

Sharath

Reply to This

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

Reply to This

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

Reply to This

Great! thanks for the tips,
I'm going to check it out right now,
Cheers =)

Reply to This

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!

Reply to This

What if I'm suing URL content type? How can I adjust height?

Reply to This

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?

Reply to 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

Reply to This

Reply to This

RSS

© 2010   Created by Ning Developer Admin

Badges  |  Report an Issue  |  Privacy  |  Terms of Service