Quantcast
Viewing all articles
Browse latest Browse all 10

So That’s What Broke!

MySpace has a good post explaining why you can’t use relative links within OpenSocial applications. If you’re building for the OpenSocial container and trying to make valid HTML apps, watch out for this one. I’ve written the following in a lot of applications and suspect that others have as well. The #na below will cause problems, despite being valid markup.

<a href="#na" onClick="doJavascriptCall();">Click Me</a>

Consider the following ways to invoke functionality instead:

<a href="javascript:;" onClick="doJavascriptCall();">Click Me</a>
<div onClick="doJavascriptCall();">Click Me</div>

Viewing all articles
Browse latest Browse all 10

Trending Articles