Welcome Guest Search | Active Topics | Sign In | Register

dialog result Options
pierreb
Posted: Wednesday, June 4, 2008 5:58:43 AM
Rank: Newbie
Groups: Member

Joined: 6/3/2008
Posts: 1
Hi,
I don't have a license...yet. I have no problems with most eo-tools except for the dialog. I went through the topics in the forum and it seems that I am the only ignorant on this planet.
I can't grab the value of commandname on client closing of the dialog window.

While debugging, the function "dialres()" is never called by thet"OnCLientClick" event

<eo:Dialog runat="server" id="Dialog1"
ControlSkinID="None" Width="300px" Height="200px"
HeaderHtml="Application name"
ShowButton="Dial"
BorderStyle="Solid"
CloseButtonUrl="00020015" BorderWidth="1px" BorderColor="#BDD1EC" BackColor="White"
AcceptButton="AcceptButton"
CancelButton="CancelButton">
<HeaderStyleActive CssText="padding-right: 4px; padding-left: 4px; font-weight: bold; font-size: 11px; padding-bottom: 6px; color: #b1b1b1; padding-top: 6px; font-family: verdana"></HeaderStyleActive>
<ContentStyleActive CssText="padding-right: 4px; border-top: #bdd1ec 1px solid; padding-left: 4px; font-size: 11px; padding-bottom: 4px; padding-top: 4px; font-family: verdana"></ContentStyleActive>
<FooterTemplate>
<div style="TEXT-ALIGN: center">
<asp:LinkButton ID="AcceptButton" CommandName="AcceptButton"
OnClientClick="dialres()" runat="server">OK</asp:LinkButton>
<asp:LinkButton ID="CancelButton" runat="server">Cancel</asp:LinkButton>
</div>
</FooterTemplate>
</eo:Dialog>

Thank you
pierreb
eo_support
Posted: Wednesday, June 4, 2008 8:02:08 AM
Rank: Administration
Groups: Administration

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

You will not be able to atach any client side JavaScript to a button that has been set to the dialog's AcceptButton. Once the button is set as an AcceptButton, the dialog would hijack the button and make its only purpose to be closing the dialog.

In your case, you want to clear the AcceptButton property first. Then change your dialres() function to something like this:

Code: JavaScript
function dialres()
{
    //do the work you were previously doing in this function
   ......

   //close the dialog
   eo_GetObject("Dialog1").close();
}


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.