Search code examples
c#jqueryasp.netjquery-pluginspicasa

JQuery PWI loading never ends


I'm using JQuery Picasa Webalbum Integrator that gets filled from codebehind. But it's not getting further than the loading screen.

My code so far looks like this.

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <%-- JQuery Libary --%>
    <script src="Java/jquery-1.6.2.min.js" type="text/javascript"></script>

    <%-- SlimBox --%>
    <link   href="Java/jquery.slimbox2/jquery.slimbox2.css" rel="stylesheet" type="text/css"/>
    <script src="Java/jquery.slimbox2/jquery.slimbox2.js" type="text/javascript"></script>

    <script src="Java/jquery.blockUI.js" type="text/javascript"></script>

    <%-- PWI --%>
    <link   href="CSS/pwi.css" rel="stylesheet" type="text/css"/>
    <script src="Java/jquery.pwi.js" type="text/javascript"></script>

    <asp:Literal ID="Literal1" runat="server"></asp:Literal>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="container">
    </div>

    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</asp:Content>

The Codebehind looks like this.

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["ID"] != null)
        {
            Label1.Text = "";

            Literal1.Text = "";
            Literal1.Text += "<script type=\"text/javascript\">";
            Literal1.Text += "$(document).ready(function() {";
            Literal1.Text += "$(\"#container\").pwi({";
            Literal1.Text += "username: '" + Gallery.GetByID(int.Parse(Request.QueryString["ID"])).Username + "',";
            Literal1.Text += "mode: 'albums',";
            Literal1.Text += "albums: [\"" + Gallery.GetByID(int.Parse(Request.QueryString["ID"])).Album + "\"],";
            Literal1.Text += "thumbCss: { margin: '5px' },";
            Literal1.Text += "onclickThumb: \"\"";
            Literal1.Text += "});";
            Literal1.Text += "});";
            Literal1.Text += "</script>";
        }
        else
        {
            Label1.Text = "";
            Label1.Text = "Fejl";
        }
    }

the Querystring I get from a different page.


Solution

  • I found the fault. It was the username. You see my picasa account got two emails connected to it, which apparently gives a problem when loading. What I did was to create a new acount and a new album, and now it all works fine. As long as the album is public.