Hello,
Please see the attached file. How can I use the WebDialog window to achieve this functionality ?
I would like to open each web dialog in a separate iFrame.
Thank you very much, any help is appreciated.
I've done some exercises related to this subject
This effect can be achieved using Infragistics WebDialogWindows
Given this configuration: MainPage.aspx, Popup1.aspx, Popup2.aspx where
MainPage.aspx opens Popup1.aspx and
Popup1.aspx opens Popup2.aspx
The idea is to place both WebDialogWindows controls within MainPage.aspx
In MainPage.aspx we shall have the JavaScript code to open both popup1 and popup2 (simplified code)
function LaunchFirstPopup()
{
w1 = $find('<% =WebDialogWindow1.ClientID %>');
w1.get_contentPane().set_contentUrl('Popup1.aspx');
w1.show();
}
function LaunchSecondPopup()
w2 = $find('<% =WebDialogWindow2.ClientID %>');
w2.get_contentPane().set_contentUrl('Popup2.aspx');
w2.show();
In Popup1.aspx we shall open Popup2.aspx using something like :
One question I would have refers to the interaction beween the parent->child windows
i.e. how to refer from within MainPage.aspx to html controls contained in the child Popup1.aspx ?
i.e. how to refer from within Popup1.aspx to html controls contained in the child Popup2.aspx ?
Thank you
Hello mateia,
Thank you for posting in our forum.
You can get the frame elements of the main page and from them you can search for the elements you need by id. For example:
To get an element from the first popup (Popup1.aspx) through the main page you can get the frames collection. For example:
var input = this.frames[0].document.getElementById("input1");
Keep in mind that the frame must have its content set otherwise it will be empty.
To get an element from the second pop up(Popup2.aspx) through the first pop up (Popup1.aspx) you can get the parent and then its frames collection:
var txtBox = parent.frames[2].document.getElementById('txtBox1');
Here it’s important to consider whether the first dialog is modal. If it’s modal an iframe will be added to the page to prevent interactions with the main page. For that reason the frame you need is not the 1st one(which would be the background iframe) but the 2nd one.
Please refer to the attached sample and let me know if you have any questions or concerns.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support