|
Rank: Advanced Member Groups: Member
Joined: 5/15/2013 Posts: 34
|
Hi, I have a dialog window (Dialog1) displayed from my main page. It is moveable, but fixed in size of 334px by 415px. I'm using the Vista style templates. Within Dialog1 I open Dialog2, also moveable and fixed in size of 410px by 705px -- larger then Dialog1. The right side and bottom get cropped and can't display. I remove ConfineElementId (and also set to screen) but Dialog2 is still confined to the smaller size window of Dialog1. How can I get it to be unconfined or at least confined to my main browser window? Changing the size of my Dialogs to have Dialog2 fit within Dialog1 is not a option and the Dialog 1 layout would be really crappy looking. The Stacking Model demo does what I need but I cant see where I'm going wrong. Also note that Dialog2 in contained in a ASCX control file -- If that makes a difference....
Code: HTML/ASPX
<eo:Dialog ID="Dialog1" runat="server" CloseButtonUrl="00020440" ControlSkinID="None" HeaderHtml='Dialog Title' HeaderHtmlFormat="<div style="padding-top:4px">{0}</div>" HeaderImageHeight="27" HeaderImageUrl="00020441">
<HeaderStyleActive CssText="background-image:url(00020442);color:#444444;font-family:'Arial';font-size:10pt;font-weight:bold;padding-bottom:7px;padding-left:8px;padding-right:0px;padding-top:0px;" />
<ContentStyleActive CssText="background-color:#f0f0f0;font-family:Arial;font-size:8pt;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px" />
<ContentTemplate>
<iframe id="Dialog1Frame" src=""></iframe>
</ContentTemplate>
<FooterStyleActive CssText="background-color:#f0f0f0; padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: Arial" />
<BorderImages BottomBorder="00020409,00020429" BottomLeftCorner="00020408,00020428" BottomRightCorner="00020410,00020430" LeftBorder="00020406,00020426" RightBorder="00020407,00020427" TopBorder="00020402,00020422" TopLeftCorner="00020401,00020421" TopLeftCornerBottom="00020404,00020424" TopRightCorner="00020403,00020423" TopRightCornerBottom="00020405,00020425" />
</eo:Dialog>
Code: HTML/ASPX
<eo:Dialog ID="Dialog2" runat="server" Height="410px" Width="705px" CloseButtonUrl="00020440" ControlSkinID="None" HeaderHtml="Aircraft Equipment" HeaderHtmlFormat="<div style="padding-top:4px">{0}</div>" HeaderImageHeight="27" HeaderImageUrl="00020441" MinHeight="100" MinWidth="150" ContentUrl="/AircraftOptionDlg.aspx">
<HeaderStyleActive CssText="background-image:url(00020442);color:#444444;font-family:'trebuchet ms';font-size:10pt;font-weight:bold;padding-bottom:7px;padding-left:8px;padding-right:0px;padding-top:0px;" />
<ContentStyleActive CssText="background-color:#f0f0f0;font-family:tahoma;font-size:8pt;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px" />
<FooterStyleActive CssText="background-color:#f0f0f0; padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
<BorderImages BottomBorder="00020409,00020429" BottomLeftCorner="00020408,00020428" BottomRightCorner="00020410,00020430" LeftBorder="00020406,00020426" RightBorder="00020407,00020427" TopBorder="00020402,00020422" TopLeftCorner="00020401,00020421" TopLeftCornerBottom="00020404,00020424" TopRightCorner="00020403,00020423" TopRightCornerBottom="00020405,00020425" />
</eo:Dialog>
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
If you use iframe on the first dialog and the second dialog is inside the iframe of the first dialog, then the second dialog can not go beyond the containing iframe. Otherwise they should not affect each other.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/15/2013 Posts: 34
|
Thanks for the replay.
But now I'm in big trouble.
I had to go to the iframe to get resize to work - as your request.
see "eo:Dialog.resize() size is different in different browsers" for more details.
So ... what do you guys want me to do now? I'm thinking the Dialog1 resize problem needs to be fixed proper.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Your original code uses ContentUrl. It's the same as using iframe. The root of the problem is a HTML element can not be positioned beyond its containing page. This is true regardless if you use ContentUrl or use iframe directly. If you want to change the element's visible scope, you have to change which page it belongs. In your case, because Dialog2 belongs to content page, so it can not be positioned beyond the content page's boundary. So you need to change your code design to avoid this problem. The problem has nothing to do with dialog or dialog resizing at all.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 5/15/2013 Posts: 34
|
OK.
If I understand you right Dialog 2 would need to be shown from my route page that shows Dialog1.
All my dialogs are shown on the Client side using JavaScript. So I assume my main page would have the Dialog2 control on it and the JavaScript to open it.
When my Dialog1 page wants to show the Dialog2 page it would just call the JavaScript on it parent (i.e. the main page) to open the dialog2 dialog.
If the above is true (which I think it is) I only would have to deal with the return values when Dialog2 closes. It does a postback to the server and passes the result of 2 hidden fields back to Dialog1 which it requires.
Questions on this:
How will the Dialog1 page know when the Dialog2 page closes? My Dialog1 requires results from Dialog2 (contained in hidden fields on the Dialog2 page from a postback - no state is saved on the server it just validates things)?
Can the JavaScript on Dialog2 communicate with the JavaScript on dialog1 (again when the Dialog 2 closes -- accept/cancel events)??
In this case will the parent JavaScript be able to disable Dialog1 content when Dialog2 is open, and also will the parent be able to activate the Dialog1 content when the Dialog2 closes ??
I require to use the ContentUrl in Dialog1 from my main page as it is used to show many different dialogs. I have to work around this restraint.....
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You will have to work out those yourself. All your questions are about how JavaScript code inside page2 communicates with JavaScript code inside page1. We consider those generic Web/JavaScript programming questions, so we are not in a position to offer support on those. In another word, how the dialog triggers a piece of JavaScript is on us, what that JavaScript code does, how it communicate with other code in your project, is on you.
Thanks!
|
|