jquery thickbox not working in 2005 ASP.NET

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-03-31T15:20:39Z Indexed on 2010/03/31 15:23 UTC
Read the original article Hit count: 362

Filed under:
|
|
public void DisplayThickBox(Page page, int width, int height)
    {
        string script = "<script type='text/javascript'>";
        script += "$(document).ready(function(){";
        script += "tb.show('null', 'auto-insurance-redirect.aspx?keepThis=true&TB_iframe=true&height=" + height.ToString() + "&amp;width=" + width.ToString() + "',null);";
        script += "});";
        script +="</script>";

        ScriptManager.RegisterStartupScript(page, page.GetType(), "", script, true);

    }

^^^Method to display the thickbox...^^^

DisplayThickBox(this, 518, 321);

^^^Call to method in the click event of the button that fires it...^^^

Page is just refreshing and the thickbox is never displayed. I'm trying to call the javascript manually since im doing some other stuff before i display the thickbox in the code behind...

© Stack Overflow or respective owner

Related posts about thickbox

Related posts about ASP.NET