fblogin.js can't see Silverlight object

Nov 19, 2009 at 9:39 PM

I've got a Silverlight app hosted in an ASP.NET site as a Silverlight object.....

        <asp:Silverlight ID="Jingler" runat="server" 
                Source="~/ClientBin/Jingler.xap" 
                MinimumVersion="3.0.40624.0" 
                Width="100%" Height="560" />
And I've got the fblogin.js var set accordingly....

var silverlightPluginId = "Jingler";

But when it comes time to get the element by Id, it returns null. And as a side to this question what is FacebookLoginControl

and where is it declared?

 

 

function
facebook_getSession () { FB.Facebook.get_sessionState().waitUntilReady(function() { var session = FB.Facebook.apiClient.get_session(); var plugin = document.getElementById(silverlightPluginId ); plugin.Content.FacebookLoginControl.LoggedIn(session.session_key, session.secret, session.expires, session.uid ); Any help would be much appreciated, thanks,
Steve

 

 

 

 

<font size="2" color="#0000ff"><font size="2" color="#0000ff">

 

</font></font><font size="2" color="#0000ff">

 

</font>

 

 

 

Nov 19, 2009 at 11:57 PM

After looking at the document in the debugger I realized that after the asp page is compiled the silverlight object's id is actually...

"ctl00_MainContentPlaceHolder_Jingler"

Mystery solved.