I'm writing an app whose canvas page gets quite long. I have a link which does a jQuery smoothscroll to the top which worked fine on my development server.
However, Ning's gadget container is from the domain, *.ninggadgets.com, while the network is from *.ning.com or mycustomdomain.com. This causes the JS which references the iframe's parent (window.parent) to cause a cross-domain security error.
Is there anyway to wrap the gadget container so that it comes from the same domain as the surrounding page? Or is there another way to bypass this security restriction?
thx!
HKS
Tags:
To get around the cross domain issues with OpenSocial, you can use the gadgets.io.makeRequest function. Checkout the Accessing External Resources page.
Thanks Devin. Yeah data requests are fine with makeRequest, but there are more issues with cross domain...
For example reading the query string of page's url via window.parent.location.search causes an access error, thus preventing having more than one url-based startup states for the application.
Also, I've noticed that the OS native method, gadget.window.adjustHeight(), also throws JS errors due to cross domain security...
Devin said:
To get around the cross domain issues with OpenSocial, you can use the gadgets.io.makeRequest function. Checkout the Accessing External Resources page.
Posted by Kyle Ford on October 13, 2010 at 8:00am 3 Comments 3 Likes
Posted by Phil McCluskey on October 1, 2010 at 8:55am 0 Comments 1 Like
Posted by Kyle Ford on September 30, 2010 at 8:30pm 1 Comment 1 Like
© 2024 Created by Build Team. Powered by