views:

64

answers:

1

I am using ASP.Net and jQuery + jQuery UI. Everything 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?

+1  A: 

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

XGreen
We have many Add New X entries, done off of this popup technique, any way to work around this ?
Seth Duncan
I would say its better if you approach the matter by giving feedback in modal popup from ajaxtool kit or use normal jquery lightboxes, faceboxes..there is loads of them.The good ones like facebox have ajax functionality too. so they easily can be employed for giving all kind of dynamic feedback including confirmations...etc
XGreen