Welcome Guest Search | Active Topics | Sign In | Register

Dialog close itselft in 2 secondes. Options
Per
Posted: Thursday, November 29, 2007 10:18:18 AM
Rank: Newbie
Groups: Member

Joined: 8/1/2007
Posts: 5
I try to open a dialog on the main page using a button that is in the custom web control. The control is added dynamically. There can be more than one.
I did it using JavaScript which load from the main page. The code works except the dialog box closed itselft in 2 seconds. Does anybody has a idea about this? Thanks.

here is the code:
Code: JavaScript
// button click.
function OnMoreButtonClick(buttonName,buttonNumber)
{
	eo_GetObject('MoreDialog').show(false);
	return false;
}

// find the button.
function Initialize()
{
	var button = document.getElementById('f1_MoreButton');
	if (button != null)
	{
		button.onclick = function () { OnMoreButtonClick ('f1_MoreButton',1); };
	}
}


here is the dialog
Code: HTML/ASPX
<eo:dialog id="MoreDialog" style="Z-INDEX: 127; LEFT: 316px; POSITION: absolute; TOP: 925px"
runat="server" Height="200px" Width="300px" ClientSideOnAccept="OnMoreDialogOkay" AcceptButton="MoreDialogOkayButton" CancelButton="MoreDialogCancelButton" BackShadeColor="Black" BackShadeOpacity="50" BackColor="White" AcceptButtonPostBack="True">
<FooterTemplate>
<asp:Button id="MoreDialogOkayButton" runat="server" Text="Okay"></asp:Button>
<asp:Button id="MoreDialogCancelButton" runat="server" Text="Cancel"></asp:Button>
</FooterTemplate>
<ContentTemplate>
<BR>
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" border="1">
<TR>
<TD>
<asp:Label id="Label23" runat="server">SubProject</asp:Label></TD>
<TD>
<asp:DropDownList id="MoreDialogSubProjectDropDownList" runat="server"></asp:DropDownList>
</TD>
</TR>
<TR>
<TD>
<asp:Label id="Label25" runat="server">Area</asp:Label>
</TD>
<TD>
<asp:DropDownList id="MoreDialogAreaDropDownList" runat="server"></asp:DropDownList>
</TD>
</TR>
<TR>
<TD>
<asp:Label id="Label26" runat="server">Package</asp:Label></TD>
<TD>
<asp:DropDownList id="MoreDialogPackageDropDownlist" runat="server"></asp:DropDownList>
</TD>
</TR>
<TR>
<TD>
<asp:Label id="Label27" runat="server">Activity</asp:Label></TD>
<TD>
<asp:DropDownList id="MoreDialogActivityDropDownlist" runat="server"></asp:DropDownList></TD>
</TR>
</TABLE>
<BR>
<BR>
</ContentTemplate>
</eo:dialog>
eo_support
Posted: Thursday, November 29, 2007 10:56:53 AM
Rank: Administration
Groups: Administration

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

I tried your code and it works fine at here. So it appears to be something else in your page that's closing the dialog (or even reloaded the whole page). Our dialog does run any timers to close itself. So you might want to try it with a blank page and then compare that with your page to find out what triggered the problem.

Thanks


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.