Welcome Guest Search | Active Topics | Sign In | Register

Dialog content (not url) gets disabled Options
essential name
Posted: Wednesday, May 28, 2008 9:29:41 AM
Rank: Member
Groups: Member

Joined: 5/28/2008
Posts: 11
Hi.
I've been working with the TreeView and added context menu enabling me to open some different dialogs.
I've encountered some problem that once I perform a "button click" event, it creates some problem afterwards, and my some of my dialog's content get disabled.
For example: I have in the dialog some text boxes and some check boxes. the text boxes gets disabled (cannot get focus on the text box, cannot change the text), whereas the check boxes remain enabled.
I've debugged and found out that the server side code ends with no problem, however I did notice that the client side get stuck somehow. I've looked into the mather and tried some trick of "waking up the client side" by putting some "onLoad=focus()" on the <form> tag of the aspx.
Well, this solved my problem and I got no "disabled dialog content", but it worked only for those dialog with url content in it (since I put the onLoad=focus()) on the contended url. However, for dialog with no content url it is still "getting stuck", and this trick didn't work, even after trying to run "focus()" on the current page.
Does anyone has any solution for this? Are you aware of something that might make the "Dialog" code get stuck?
Thanks a lot.
eo_support
Posted: Wednesday, May 28, 2008 9:39:14 AM
Rank: Administration
Groups: Administration

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

We are not aware of any such problems. Can you create a test page that demonstrates the problem?

Thanks
essential name
Posted: Wednesday, May 28, 2008 10:19:10 AM
Rank: Member
Groups: Member

Joined: 5/28/2008
Posts: 11
Hi,
Thanks for your really quick reply.
I've created some test page, try the following scenario.

scenario:
1. click the button "show dialog2"
2. dialog will be shown. try to put some text inside the textbox, now it is possible.
3. close this dialog by "cancel"
4. click the button "show dialog1"
5. dialog will be shown with content url in it (www.google.com)
6. close this dialog by "cancel"
7. click again the button "show dialog2"
8. dialog will be shown. try to put some text inside the textbox, but now it is diabled. (it do work sometimes, but most of the times it isn't)

note the events on the code for each of the buttons/dialogs. this flow is important for my original code.

now adding my code. Thanks a lot!!


Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" %>

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

<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    
    <script type="text/javascript">

        function ReloadUpdatePnl()
        {
            __doPostBack('updatePnl', '');
        }

    </script>
    
    
    <ajax:ScriptManager runat="server" ID="scrMan1"  />
    <ajax:UpdatePanel ID="updatePnl" runat="server">
          
    
    <ContentTemplate>    
    
    <div>        
    
    <input type="button" id="btnShowDialog1" value="show dialog1" onclick="eo_GetObject('dialog1').show(true);" />
    <br />    
    <input type="button" id="btnShowDialog2" value="show dialog2" onclick="eo_GetObject('dialog2').show(true);" />
        
    </div>
    
    <eo:Dialog runat="server" id="dialog1" ContentUrl="http://www.google.com"
        CancelButton="btnCancelDialog1" ClientSideOnCancel="ReloadUpdatePnl"
	    Width="400px" Height="400px">
	    <FooterStyleActive CssText="border-right: #22456a 1px solid; padding-right: 4px; border-top: #7d97b6 1px solid; padding-left: 4px; border-left-width: 1px; font-size: 11px; border-left-color: #728eb8; padding-bottom: 4px; color: white; padding-top: 4px; border-bottom: #22456a 1px solid; font-family: verdana"></FooterStyleActive>
	    <HeaderStyleActive CssText="text-align:center; border-right: #22456a 1px solid; padding-right: 4px; border-top: #ffbf00 3px solid; padding-left: 4px; font-weight: bold; font-size: 11px; padding-bottom: 2px; color: white; padding-top: 2px; border-bottom: #22456a 1px solid; font-family: verdana;"></HeaderStyleActive>
	    <ContentStyleActive CssText="border-right: #22456a 1px solid; padding-right: 4px; border-top: #7d97b6 1px solid; padding-left: 4px; border-left-width: 1px; font-size: 11px; border-left-color: #728eb8; padding-bottom: 4px; color: white; padding-top: 4px; border-bottom: #22456a 1px solid; font-family: verdana"></ContentStyleActive>	    
	    <FooterTemplate>
	        <table>
	            <tr>
	                <td>
            	        <asp:Button ID="btnCancelDialog1" runat="server" Text="cancel" />
	                </td>
	            </tr>
	        </table>
	    </FooterTemplate>
    </eo:Dialog>
    

    <eo:Dialog runat="server" id="dialog2"
        CancelButton="btnCancelDialog2" ClientSideOnCancel="ReloadUpdatePnl"
	    Width="400px" Height="400px">
	    <FooterStyleActive CssText="border-right: #22456a 1px solid; padding-right: 4px; border-top: #7d97b6 1px solid; padding-left: 4px; border-left-width: 1px; font-size: 11px; border-left-color: #728eb8; padding-bottom: 4px; color: white; padding-top: 4px; border-bottom: #22456a 1px solid; font-family: verdana"></FooterStyleActive>
	    <HeaderStyleActive CssText="text-align:center; border-right: #22456a 1px solid; padding-right: 4px; border-top: #ffbf00 3px solid; padding-left: 4px; font-weight: bold; font-size: 11px; padding-bottom: 2px; color: white; padding-top: 2px; border-bottom: #22456a 1px solid; font-family: verdana;"></HeaderStyleActive>
	    <ContentStyleActive CssText="border-right: #22456a 1px solid; padding-right: 4px; border-top: #7d97b6 1px solid; padding-left: 4px; border-left-width: 1px; font-size: 11px; border-left-color: #728eb8; padding-bottom: 4px; color: white; padding-top: 4px; border-bottom: #22456a 1px solid; font-family: verdana"></ContentStyleActive>	    	    
	    <ContentTemplate>
	        <table style="color:Black">
	            <tr>
	                <td>
	                    this is an example of dialog2
	                </td>
	            </tr>
	            <tr>
	                <td>
	                    <asp:TextBox ID="txtText" runat="server" />
	                </td>
	            </tr>
	        </table>
	    </ContentTemplate>
	    <FooterTemplate>
	        <table>
	            <tr>
	                <td>
            	        <asp:Button ID="btnCancelDialog2" runat="server" Text="cancel" />
	                </td>
	            </tr>
	        </table>
	    </FooterTemplate>
    </eo:Dialog>

    
    </ContentTemplate>
    </ajax:UpdatePanel>
    </form>
</body>
</html>
eo_support
Posted: Wednesday, May 28, 2008 3:47:20 PM
Rank: Administration
Groups: Administration

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

Just wanted to let you know that we are still working on this issue. We will post again as soon as we need anything else from you or have a solution for you.

Thanks
eo_support
Posted: Wednesday, May 28, 2008 8:59:11 PM
Rank: Administration
Groups: Administration

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

We have posted a new build that should fix the issue. Please see your private messages for download location.

Thanks
essential name
Posted: Thursday, May 29, 2008 1:13:33 AM
Rank: Member
Groups: Member

Joined: 5/28/2008
Posts: 11
Thanks a lot for your help and the quick solution!
Is solved my problem perfectly (plus I gained some speed up to some slow parts of my application)
eo_support
Posted: Thursday, May 29, 2008 5:18:08 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Cool. Thanks for letting us know!
essential name
Posted: Sunday, June 15, 2008 10:06:11 AM
Rank: Member
Groups: Member

Joined: 5/28/2008
Posts: 11
Hi.
I've got the previous problem fixed as I've already mentioned, but now I have a new problem.
I have the version you've sent me regarding the previous problem (5.0.55.2)

The new problem:
When I open a new dialog with a content url, and clicks on the defined "close button", it is supposed to perform a postback for the update panel, and afterwards some TextBox that is not defined as "ReadOnly" suddenly becomes as "ReadOnly" (checked on the code, it is defined as readonly=false but it is impossible to write inside it). Very similiar to the previous problem.

Attached is a test page demonstrating the problem.

Thanks in advance.

Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" %>

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

<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>test bug</title>
        
    <script language="javascript" type="text/javascript">
                     
        function updatePnlPostBack()
        {
            __doPostBack('updatePnl', '');
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    
    <ajax:ScriptManager runat="server" ID="scrMan1"  />
    <ajax:UpdatePanel ID="updatePnl" runat="server">
    <ContentTemplate>
    
    <div>       
        <asp:TextBox ID="txtBoxToBeDisabled" runat="server" Text="this textbox will be readonly after the dialog is closed" Width="400px" />
        <br />
        <input type="button" runat="server" id="btn" value="click here to open dialog" onclick="eo_GetObject('dialog').show(true);" />
    
    </div>

    <eo:Dialog runat="server" id="dialog" ContentUrl="http://google.com"
        CancelButton="btnCloseDialog"
        ClientSideOnCancel="updatePnlPostBack"
        BorderStyle="Solid" CloseButtonUrl="00070101" AllowResize="false" ControlSkinID="None" 
	    Width="420px" BorderWidth="1px" Height="410px" ShadowColor="LightGray" BorderColor="#335C88" ShadowDepth="3">
	    <FooterStyleActive CssText="font-family:Tahoma;font-size:11px;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;"></FooterStyleActive>
	    <HeaderStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 11px; background-image: url(00070104); padding-bottom: 3px; padding-top: 3px; font-family: tahoma"></HeaderStyleActive>
	    <ContentStyleActive CssText="background-color:#e5f1fd;border-top-color:#335c88;border-top-style:solid;border-top-width:1px;"></ContentStyleActive>
	    <FooterTemplate>
	        After you click the button "close", the text box on the parent web page will be on "readonly" mode
	        <br />
            <asp:Button ID="btnCloseDialog" runat="server" Text="close" />
	    </FooterTemplate>
    </eo:Dialog>

    
    </ContentTemplate>
    </ajax:UpdatePanel>     
    
    </form>
</body>
</html>
eo_support
Posted: Sunday, June 15, 2008 10:23:58 AM
Rank: Administration
Groups: Administration

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

Thanks for the information. We will take a look and see what we can find.

Thanks
essential name
Posted: Wednesday, June 25, 2008 12:24:01 AM
Rank: Member
Groups: Member

Joined: 5/28/2008
Posts: 11
Hi,
Is there any news regarding this problem?
eo_support
Posted: Wednesday, June 25, 2008 1:08:12 AM
Rank: Administration
Groups: Administration

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

Not yet. We are still working on this issue. We are able to reproduce the problem with the code you provided, but haven't been able to have an reliable workaround yet. We will post again as soon as we have a solution. Thanks for your patience!

Thanks
essential name
Posted: Wednesday, June 25, 2008 1:18:17 AM
Rank: Member
Groups: Member

Joined: 5/28/2008
Posts: 11
Thanks for your quick reply.
eo_support
Posted: Wednesday, June 25, 2008 8:02:43 PM
Rank: Administration
Groups: Administration

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

The issue appears to be an IE issue. However we have discovered a workaround for this issue. Try add the following JavaScript code to the end of the page:

Code: JavaScript
function FocusTextBox()
{
    document.getElementById("txtBoxToBeDisabled").focus();
}

var manager = Sys.WebForms.PageRequestManager.getInstance();
var del = Function.createDelegate(window, FocusTextBox);
manager.add_endRequest(del);


This should re-enable the textbox again.

Thanks
essential name
Posted: Sunday, June 29, 2008 1:37:50 AM
Rank: Member
Groups: Member

Joined: 5/28/2008
Posts: 11
Hi,
well, setting focus on each of the text boxes did solve the problem, but not by your work around.
i called the FocusTextBox() method on : <body onLoad="FocursTextBox()"> and this way it worked.
your way it called this method on the closing of the dialog, but next time I've opened the dialog it was still disable-style.
Thanks for your reply, it did give me a good direction and solution.
eo_support
Posted: Monday, June 30, 2008 10:15:46 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Thanks for the update! Indeed the key is to call focus at the right time.


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.