2
Answers

Open popup in JavaScript

Prasenjit  Dey

Prasenjit Dey

11y
1.3k
1
I want to open a popup, where popup page is in different folder and my parent page is in different folder. i.e. these to pages are not in same folder. For that reason I'm facing a problem to open that popup. So can anybody help me to do this

My code id for open popup :
 function OpenNewWindow() {
                var popupPath = $('#<%= hdnPopupPath.ClientID%>').val();
                var wnd = window.radopen(popupPath, "UserListDialog");
                wnd.setSize(560, 450);
                wnd.SetTitle("Add Task");
                wnd.center();
                return false;
            }
I use this function in button onClientClick event to open popup. Where in hidden field I assign the popup page path and it is coming from codebehind page. Because if I only define the page name in "poppath" variable, then clr assume that the page is place in the same folder of parent page, but it it wrong. So for that I Use that code in code behind page to catch url of popup page :

hdnPopupPath.Value = Server.MapPath("~/Task/taskpopup.aspx");

But unfortunatly it is not working. So please anybody help me
Answers (2)