Welcome Guest Search | Active Topics | Sign In | Register

Problem opening Dialog from CallbackPanel in Google Chrome Options
Dompa
Posted: Tuesday, September 9, 2008 2:42:09 AM
Rank: Newbie
Groups: Member

Joined: 5/15/2008
Posts: 3
Hi,

We have developed an asp.net (2.0) website which currently uses EO.Web Controls Suite (2007.2).
We are attempting to move the site over to EO.Web Controls Suite (2008), but we ran in to a problem with the new browser Chrome from Google.

Our site opens dialogs in callback events using dynamic javascript injection in callback events (using EO.CallbackPanel).

This approach works fine in all browsers (including Chrome) when we use 2007.2, but when we switch to the 2008 version the dialogs won't open in Chrome. The screen flashes, but no dialog appears :-(

This is the an example of the code in the callback event:
Code: C#
Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenOrderDialog", "eo_GetObject('" + DialogOrder.ClientID + "').show(true);", true);


We are not sure whether this is an Essential Objects problem or if it's related to the Chrome beta version (We're running version 0.2.149.29 of Chrome). But since it works fine when we use 2007.2 we suspect it has something to do with Essential Objects 2008?

Do you have any suggestions on how we might get this to work with version 2008 of Essential Objects?

Best Regards,
Patrik Domberg


eo_support
Posted: Tuesday, September 9, 2008 7:49:28 AM
Rank: Administration
Groups: Administration

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

We are not aware of any problems like this. Can you create a test page that demonstrates the problem? Make sure the test page runs independently.

Thanks!
Dompa
Posted: Tuesday, September 9, 2008 9:00:26 AM
Rank: Newbie
Groups: Member

Joined: 5/15/2008
Posts: 3
Hi,

I've now published a very simple example of the problem we're experiencing.
I have removed the CallbackPanel in the example, since the problem also happens when we're not using callback panels.

The example can be viewed if you follow this link:

http://eotest.sparklecrm.nu/default.aspx

There is a button where the click event injects two javascripts:
1. Simple Javascript Alert()
2. Show dialog script

Script one works in all browsers and script two works in all browsers except Chrome.
(We have tested IE6, IE7, Firefox and Opera)
I just noticed that the problem also exists when we use Safari on windows and Mac :-(

All browsers above work just fine when we use version 2007.2 (Fileversion 5.0.51.2)
I published the exact same version of the application except that I replaced the EO.Web.dll with version 2007.2 here:
http://eotest2007.sparklecrm.nu/default.aspx

The source for the page is as follows:
Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ 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">
    <eo:Dialog ID="DialogOrder" runat="server" 
    Height="200px" Width="300px" AllowResize="True" CloseButtonUrl="00070101" 
            ControlSkinID="None" HeaderHtml="Order dialog" BorderColor="#335C88" 
            BorderStyle="Solid" BorderWidth="1px" MinimizeButtonUrl="00070102" 
            ResizeImageUrl="00020014" RestoreButtonUrl="00070103" ShadowColor="LightGray" 
            ShadowDepth="3">
            <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" />
        </eo:Dialog>
        <asp:Button ID="ButtonShowDialog" runat="server" Text="Show dialog" 
            onclick="ButtonShowDialog_Click" style="height: 26px" />
    </form>
</body>
</html>


Here is the code-behind source:
Code: C#
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void ButtonShowDialog_Click(object sender, EventArgs e)
    {
        Page.ClientScript.RegisterStartupScript(this.GetType(), "PlainJavaScript", "alert('Javascript alert');", true);
        Page.ClientScript.RegisterStartupScript(this.GetType(), "ShowOrderDialog", "eo_GetObject('" + DialogOrder.ClientID + "').show(true);", true);
    }
}


Any help regarding this problem is much appreciated :-)

Regards,
Patrik
eo_support
Posted: Tuesday, September 9, 2008 1:23:01 PM
Rank: Administration
Groups: Administration

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

We looked into the issue and noticed that on Chrome the dialog is not fully initialized until the page is fully loaded. Thus you would need to delay showing the dialog after that. You can do that easily by calling window.setTimeout. It will be something like this:

"window.setTimeout('eo_GetObject(\"" + DialogOrder.ClientID + "\").show(true);', 10);"

Please let us know if that works for you.

Thanks!
Dompa
Posted: Tuesday, September 9, 2008 2:27:43 PM
Rank: Newbie
Groups: Member

Joined: 5/15/2008
Posts: 3
Hi,

I just tested your suggestion and it works great for me :-)

Thanks for your help.

Regards,
Patrik
eo_support
Posted: Tuesday, September 9, 2008 2:34:29 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Great. Thanks for the update!


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.