A.aspx opens a fancybox modal window of b.aspx means here a.aspx is parent and b.aspx is child.
Requirement is on clicking the close button, it will trigger a method of child window(b.aspx) and that method will close the window on if...else condition.
The problem I am facing is I am not able to call the child window method on fancybox window close.
I have tried with 'beforeClose' event to call the child method, but it is throwing error with 'undefined'.
The fancybox is an object of the parent so something like the following will need to be done from the child:
parent.fancybox.close();
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.