i hv an asp.net form in which i have used master page, in this by clicking on one link button a popup window will be opened, my problem is i want to close a popup child window when parent form is closed.. or i should make parent form disable when child popup is active...
i got some code but its working only for IE,, please help me to work this in Google chrome
this is my code which is working For IE
in parent window i wrote like this
function topWindow() {
var popup = window.open('BranchSearch.aspx', 'mywindow', 'location=1,width=450,height=100,toolbar=0,menubar=no,resizable=no,scrollbars=no,status=no,left=340,top=340');
popup.focus();
}
and in body tag of child pop window i wrote like dis
please help me as soon as possible
thank u
You can use window.showModalDialog This will disable parent window until you close the child window.
Related
Click from parent window open a child window using window.open("url","name").If again clicked the parent for opening the child window then check if the child window is already opened.if it is already opened then bring to view that page without reloading otherwise open in new window.
If you want to open the popup window using window.open() itself then check this thread
Check if a popup window is already open before opening it using Jquery
There is a better alternative to do this by using Jquery Dialog:
Just put a div in the parent window which will act as the container for the popup contents and check whether it is visible or not.
I am working on an application. I have opened a Window using
window.open()
Now after opening this window, the parent Page is getting Refreshed(Means Page Load is Happening).
Now , How can I set the Focus on the Child Window after the Page load of the Parent Page.
Please Help.
To set the focus on new window.
Try Using
window.focus()
Get the handle to the window you are opening, and set focus to it using the handle after you are done reloading the parent page.
var popup = window.open(); //open the child window
location.reload(); // reload the parent page
popup.focus(); //set focus on the child window
I am using telrik radopen function to open the popups. I have a situation in which child popup opens from parent popup which opens from grandparent .aspx page.
Grandparent (.aspx page) -> popup (parent) -> popup(child)
I want to close the parent popup and child popup on click of a button on child popup. I tried using
GetRadWindow().BrowserWindow.BrowserWindow.Close() // this one and variations of this errored !
GetRadWindow().BrowserWindow.close(); // this didn't error but didn't close parent window
GetRadWindow().Close(); //this closes only child window when invoked from button click on //child window
I read the question Is it possible to close parent window from child (Javascript)?
If in case it is not possible to close the parent popup from child popup is there a workaround so that I can simulate the behavior of 'submit button click' on child control can close child and parent popup and refresh the grid on the grandparent .aspx page?
May be redirect can help. In that case how do I do that?
Any suggestions.
Thanks
Instead of closing all Windows a one shot, you can close Child Window first, then close the Parent Windows (based on the value passed by the Child Window).
Window / Returning Values from a Dialog
CommunicationBetweenRadWindowsASPNET.zip
I am using the AJAX modalpopupextender and I have an iframe embedded in the modal popup. I need to be able to reference the parent window (the window from which the modal popup was launched) to reload/change the URL when certain events on the modal popup are fired. I have tried window. top, window.parent, opener, root, etc., and have had no success. Any help would be appreciated.
Something along the lines of:
self.parent.opener
I've created a modal popup a bit like that in the past, and that selector enabled me to start mucking around with the DOM on the page that opened the window.
See more here or here
In my webpage I have a treeview with some items. When I clicking on a node I needs to open a Popup window and it is working fine. But the Parent window that contains the treeview goes to null. Why this happen so?
I think if you set this, your problem will be resolved
NavigateUrl="javascript://"
otherwise you need to post the code.