开发者

jQuery not working on Popup Window

I am using ASP.Net and jQuery + jQuery UI. Ever开发者_StackOverflow中文版ything works fine with the jQuery on any other page, however when I create a popup window with window.open(...) jQuery seems to no longer function.

I have all of the script files included on the Popup's Master page, so am not sure why it won't fire.

Any Thoughts?


I am not sure if you use window.open you are creating a page class that inherits from the master page.

So JQuery is probabaly not included in that pop up. In addition popups aren't nice. people download all kind of things so they don't open. but it can be done like this:

protected void Button1_Click(object sender, EventArgs e)


{


string queryString = 


    "http://localhost:39208/TreeView.aspx?param1=" 


    + TextBox1.Text.Trim();   


string newWin = 


    "window.open('" + queryString + "');";


ClientScript.RegisterStartupScript


    (this.GetType(), "pop", newWin, true);


}

ClientScript.RegisterStartupScript will bring your jquery in the pop up

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜