|
Rank: Newbie Groups: Member
Joined: 5/4/2009 Posts: 3
|
I am trying to create a dialog that does not scroll with the browser. The content inside of our dialog will be very long and the way I am doing it will not allow for the the bottom to ever be shown.
Is there a way around this?
Here is an example:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ModalTest2.aspx.cs" Inherits="Test_ModalTest2" %>
<%@ 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></title> </head> <body> <form id="form1" runat="server"> <div> <script type="text/javascript" language="javascript"> function test() { $get('contentDiv').innerHTML = "I need to be shown"; eo_GetObject('ViewEvaluationDLG').show(true, 'the caption', null); }
function ok() { alert('ok'); }
function cancel() { alert('cancel'); } </script> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <div class="pageContentDiv" style="width: 100%; left: 0px; top: 0px;"> <asp:UpdatePanel ID="PageUP" runat="server" UpdateMode="Conditional"> <ContentTemplate> <input type="button" onclick="test();" value="Test" /> <eo:DatePicker ID="DatePicker1" runat="server" ControlSkinID="None" DayCellHeight="16" DayCellWidth="21" DayHeaderFormat="FirstLetter" DisabledDates="" GridLineColor="207, 217, 227" GridLineFrameVisible="False" GridLineVisible="True" SelectedDates="" TitleFormat="MMM yyyy" TitleLeftArrowHtml="&lt;" TitleRightArrowHtml="&gt;" VisibleDate="2009-07-01"> <SelectedDayStyle CssText="font-size: 11px; font-family: verdana;border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; border-bottom: black 1px solid; background-color: white" /> <CalendarStyle CssText="border-right: #cfd9e3 1px solid; border-top: #cfd9e3 1px solid; font-size: 11px; border-left: #cfd9e3 1px solid; cursor: hand; border-bottom: #cfd9e3 1px solid; font-family: verdana; background-color: #eaeaea" /> <DayHoverStyle CssText="font-size: 11px; font-family: verdana;border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; border-bottom: black 1px solid; background-color: white" /> <TitleStyle CssText="padding-right: 3px; padding-left: 3px; font-weight: bold; padding-bottom: 3px; color: white; padding-top: 3px; border-bottom: #cfd9e3 1px solid; background-color: #006699; font-size: 11px; font-family: verdana;" /> <DayHeaderStyle CssText="font-size: 11px; font-family: verdana;height: 17px" /> <DayStyle CssText="font-size: 11px; font-family: verdana;border-right: #eaeaea 1px solid; border-top: #eaeaea 1px solid; border-left: #eaeaea 1px solid; border-bottom: #eaeaea 1px solid; background-color: #eaeaea" /> </eo:DatePicker> <eo:Dialog ID="ViewEvaluationDLG" runat="server" Height="200px" Width="300px" AllowResize="True" BorderColor="#335C88" BorderStyle="Solid" BorderWidth="1px" CloseButtonUrl="00070101" ControlSkinID="None" HeaderHtml="Dialog Title" MinimizeButtonUrl="00070102" ResizeImageUrl="00020014" RestoreButtonUrl="00070103" ShadowColor="LightGray" ShadowDepth="3" AcceptButton="OKBTN2" ClientSideOnAccept="ok" CancelButton="CancelBTN" ClientSideOnCancel="cancel"> <HeaderStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 11px; background-image: url(00070104); padding-bottom: 3px; padding-top: 3px; font-family: tahoma" /> <FooterStyleActive CssText="background-color: #e5f1fd; padding-bottom: 8px;" /> <ContentStyleActive CssText="border-top: #335c88 1px solid; background-color: #e5f1fd" /> <ContentTemplate> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <div id="contentDiv"></div> <p>Yeah I am Here</p> <asp:Button ID="OKBTN2" runat="server" Text="OK" /> <asp:Button ID="CancelBTN" runat="server" Text="Cancel" /> </ContentTemplate> </eo:Dialog> </ContentTemplate> </asp:UpdatePanel> </div> </div> </form> </body> </html>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I don't believe there is such an option on the dialog. When the page scrolls, the dialog does not scroll along with the page. In another word, it always stay fixed regardless of the page scroll offset and I am not aware of any option to change this behavior. Sorry about that!
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/4/2009 Posts: 3
|
Just want to make sure you are understanding my question....
The dialog I created is always in the middle of the browser screen. If the dialog streteches beyond the bounds of the browser screen then I can't get to it even when I scroll. Is there a way to keep the dialog at a certain position so that it is possible to see the parts of the dialog that are not shown initially?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, Yes. I do understand your question. When I say the dialog "does not move", I meant visually it does not move. Internally it is exactly the opposite: it moves to compensate the scroll offset when you scroll. I did notice that a solution exists while reviewing the question though. To solve your problem, set the dialog's ConfineElementID to an HTML element in your page. For example:
Code: HTML/ASPX
<div id="dialog_anchor" style="width:300px;height:300px;"></div>
<eo:Dialog ConfineElementID="dialog_anchor" ....>
......
</eo:Dialog>
The dialog will try its best to stay inside the ConfineElementID you specified. That usually means to scroll along with that element when the page scrolls. Please let us know if this works for you. Thanks!
|
|