Welcome Guest Search | Active Topics | Sign In | Register

Resizing a Dialog client-side Options
Mark Rae
Posted: Friday, November 21, 2008 2:33:41 PM
Rank: Advanced Member
Groups: Member

Joined: 11/13/2008
Posts: 43
I'm trying to resize a Dialog client-side. According to the documentation, the JavaScript code for this is: Dialog.resize(w, h)

I'm using the following JavaScript:

Code: JavaScript
var objDialog = eo_GetObject('Dialog1');
objDialog.resize(500, 500);
objDialog.setContentUrl('review.html');
objDialog.show(true);


This resizes the width of the Dialog correctly, but it sets its height to what looks like about 10px. And, even though the AllowResize property is set to "true", I can only resize the width, not the height.

I've tried slightly different syntax e.g. objDialog.resize('500px', '500px') but it made no difference.
eo_support
Posted: Friday, November 21, 2008 4:27:25 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Please check if you have set the dialog's MaxHeight or ConfineElementID property. This two properties can affect dialog size. The dialog always tries to honor MaxHeight, and I believe if that property is not set, it would use the window height as max height. ConfineElementID can also affect the dialog's size in a similar way.

Hope this helps. If this does not seem to be a problem, please creates a test page that reproduces the problem, and we will be happy to take a look as soon as we have that.

Thanks
Mark Rae
Posted: Saturday, November 22, 2008 4:25:09 AM
Rank: Advanced Member
Groups: Member

Joined: 11/13/2008
Posts: 43
eo_support wrote:
Please check if you have set the dialog's MaxHeight or ConfineElementID property. This two properties can affect dialog size. The dialog always tries to honor MaxHeight, and I believe if that property is not set, it would use the window height as max height. ConfineElementID can also affect the dialog's size in a similar way.

I have not set the dialog's MaxHeight. I have set ConfineElementID="" as advised by you in an earlier thread...

eo_support wrote:
If this does not seem to be a problem, please creates a test page that reproduces the problem, and we will be happy to take a look as soon as we have that.

Test page follows.

I have remmed out the .resize JavaScript line - if you click the hyperlink while this line is remmed out, all is well. However, as soon as the .resize line is remmed in, the dialog's height shrinks to almost nothing, and it cannot be resized. The width seems to be OK.

Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Test Dialog</title>
	<script type="text/javascript">
		function showReview(pstrReview, pintWidth, pintHeight)
		{
			var objDialog = eo_GetObject('<%=dlgReview.ClientID%>');
			//objDialog.resize(pintWidth, pintHeight);
			objDialog.setContentUrl(pstrReview);
			objDialog.show(true);
		}
	</script>
</head>
<body>
    <form id="form1" runat="server">
		<a href="javascript:showReview('http://www.inthecage.co.uk/reviews/20080927_dr.htm', 700, 500);">Show review</a>
		<eo:Dialog runat="server" id="dlgReview" HeaderImageUrl="00020441" HeaderImageHeight="27" AllowResize="true" ControlSkinID="None" 
			HeaderHtml='
"padding-top:5px;">Review</div>' Height="600px" Width="800px" BackColor="#ECE9D8" CloseButtonUrl="00020440" ConfineElementID="" ContentUrl="http://www.inthecage.co.uk/"> <HeaderStyleActive CssText="background-image:url(00020442);color:#444444;font-family:'trebuchet ms';font-size:10pt;font-weight:bold;padding-a:0px;padding-b:0px;padding-bottom:7px;padding-c:0px;padding-d:0px;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;" /> <BorderImages BottomBorder="00020409,00020429" RightBorder="00020407,00020427" TopRightCornerBottom="00020405,00020425" TopRightCorner="00020403,00020423" LeftBorder="00020406,00020426" TopLeftCorner="00020401,00020421" BottomRightCorner="00020410,00020430" TopLeftCornerBottom="00020404,00020424" BottomLeftCorner="00020408,00020428" TopBorder="00020402,00020422" /> </eo:Dialog> </form> </body> </html>
eo_support
Posted: Saturday, November 22, 2008 5:11:26 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

We have reproduced the problem on IE 7 with the code you provided. The problem does not seem to be occurring on IE 6 or FireFox. We are looking into it and hopefully can get you an update build soon with the fix.

Thanks!
Mark Rae
Posted: Saturday, November 22, 2008 6:13:13 AM
Rank: Advanced Member
Groups: Member

Joined: 11/13/2008
Posts: 43
eo_support wrote:
We have reproduced the problem on IE 7 with the code you provided. The problem does not seem to be occurring on IE 6 or FireFox.

If it helps at all, the problem also occurs in the latest beta release of IE8 - I realise you don't support this officially yet...

eo_support wrote:
We are looking into it and hopefully can get you an update build soon with the fix.

I look forward to receiving it - thanks.
eo_support
Posted: Sunday, November 23, 2008 8:40:10 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Thanks for the additional information. We have posted a new build that fixed this issue and verified it on both IE 7 and IE 8. Please see your private message for download location.

Please feel free to let us know if you have any more questions.

Thanks!
Mark Rae
Posted: Sunday, November 23, 2008 9:38:38 AM
Rank: Advanced Member
Groups: Member

Joined: 11/13/2008
Posts: 43
eo_support wrote:
Thanks for the additional information. We have posted a new build that fixed this issue and verified it on both IE 7 and IE 8. Please see your private message for download location.

This no longer shrinks the height to almost zero.

However, it seems to have introducted a much more serious problem. Specifically, when a dialog is opened for the first time, it seems to work correctly. However, if it is opened more then once and resized with different dimensions, it seems to "remember" the size from the first time. If the second time the content is larger than the dimensions passed in the resize(w, h) method, no scrollbars appear.

You can see this here: http://www.inthecage.co.uk/reviews/

1) Scroll down to the "Mick Jagger Centre, Dartford - 31 March 2007" hyperlink - that calls the resize(700, 300) method.

2) Close the dialog.

3) Now click the "Half Moon, Putney - 8 July 2007" review immediately above the last one. That calls the resize(800, 560) method, but the dialog is opened with the same dimensions as the first time.
eo_support
Posted: Sunday, November 23, 2008 10:27:40 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Thanks for the information. We do see the problem. We will look into it and see what we can find.

Thanks!
eo_support
Posted: Thursday, December 4, 2008 1:51:19 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
This issue is fixed in build 2008.0.53.
Droma81
Posted: Wednesday, December 19, 2012 5:01:26 PM
Rank: Member
Groups: Member

Joined: 11/16/2012
Posts: 11
I am seeing a similiar issue using IE 9..I have some users who see the dialog minimized while others see it maximized. After 3 users, only one was able to see the dialog box appropriately - she was my test user so I'm not sure if something was biased.

Here is my code behind:

urlReport = "'../Claims/Admin/AddGenericPayment.aspx?ClaimID=" + _ClaimNumber + "'";
titleReport = "'New Generic Payment for Claim Number: " + _ClaimNumber + "'";
_Anchor.InnerText = "Add a Generic Payment";
this.HiddenClaimID.Value = _ClaimNumber.ToString();
_Anchor.HRef = @"javascript:showDialogModal(" + control + "," + urlReport + "," + titleReport + "); ";
PlaceHolderReports.Controls.Add(_Literal);
PlaceHolderReports.Controls.Add(_Anchor);


Here is my javascript code:

function showDialogModal(control,url,title) {
var dlg = eo_GetObject(control);
dlg.setContentUrl(url);
dlg.setCaption(title);
dlg.show(true);
}

Here is my dialog:

<eo:Dialog runat="server" ID="DialogReports" HeaderHtml="Reports" ContentUrl="ViewClaim.aspx"
AllowMove="true" AllowResize="true" CloseButtonUrl="00020312" BackShadeColor="Gray"
BackShadeOpacity="50" ControlSkinID="None" Width="800px" Height="500px" BackColor="White" CancelButton="Button3" ClientSideOnAccept="reloadPage" ClientSideOnCancel="reloadPage">
<HeaderStyleActive CssText="background-image:url('00020311');color:black;font-family:'trebuchet ms';font-size:10pt;font-weight:bold;padding-bottom:5px;padding-left:8px;padding-right:3px;padding-top:0px;height:18px;">
</HeaderStyleActive>
<ContentStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma">
</ContentStyleActive>
<ContentTemplate>
</ContentTemplate>
<FooterTemplate>
<div style="text-align: center">
<asp:Button ID="Button6" runat="server" Text="Close Window" />
</div>
</FooterTemplate>
<ShowEffect Type="GlideTopToBottom"></ShowEffect>
<CloseEffect Type="GlideTopToBottom"></CloseEffect>
<FooterStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
<BorderImages BottomBorder="00020305" BottomLeftCorner="00020304" BottomRightCorner="00020306"
LeftBorder="00020303" RightBorder="00020307" TopBorder="00020310" TopLeftCorner="00020301"
TopLeftCornerBottom="00020302" TopRightCorner="00020309" TopRightCornerBottom="00020308" />
</eo:Dialog>
eo_support
Posted: Wednesday, December 19, 2012 9:04:50 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Your code looks fine to us. Please try to isolate the problem into a test page and providing steps to reproduce the problem. Once we have that we will be happy to look further.

Thanks!
Droma81
Posted: Thursday, December 20, 2012 8:53:29 AM
Rank: Member
Groups: Member

Joined: 11/16/2012
Posts: 11
who do I send it to?


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.