I have added a component art dialog control to an user control and can no longer open the dialog in my page using dialog.show() (in IE) which was working fine outside the user control. I can open the dialog control in firefox however but the close() method doesn't work.
Here's is my code
TestUserControl.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestUserControl.aspx.cs" Inherits="TestUserControl" %>
<%@ Register TagPrefix="Dialog" TagName="CADialog" Src="TestUserControl.ascx"%>
<%@ Register Assembly="ComponentArt.Web.UI" Namespace="ComponentArt.Web.UI" TagPrefix="ComponentArt" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<Dialog:CADialog ID="CADialog1" runat="server" />
</form>
</body>
</html>
User control
TestUserControl.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TestUserControl.ascx.cs" Inherits="TestUserControl" %>
<%@ Register Assembly="ComponentArt.Web.UI" Namespace="ComponentArt.Web.UI" TagPrefix="ComponentArt" %>
<script type="text/javascript">
function showHelpDialog(){
//window.CADialog1_ShowPageHelp.show();
//ShowPageHelp.set_content(' ');
ShowPageHelp.show();
return false;
}
function hideHelpDialog(){
//CADialog1_ShowPageHelp.close();
ShowPageHelp.close();
return false;
}
</script>
<img src="App_Themes/SolcaraStandard/Images/Banner/QuestionMark.gif" style="cursor:pointer" alt="How to use this page" title="How to use this page" onclick="showHelpDialog();" />
<ComponentArt:Dialog
ID="ShowPageHelp"
skinid="Standard"
Title="How to use this page"
HeaderClientTemplateId="header"
runat="server">
<ClientTemplates>
<ComponentArt:ClientTemplate id="header">
<img src="App_Themes/SolcaraStandard/Images/Dialog/close.gif" onclick="hideHelpDialog();" />
</ComponentArt:ClientTemplate>
</ClientTemplates>
</ComponentArt:Dialog>
I have noted that I seem to be experience a simular problem to this post
http://www.componentart.com/forums/ShowPost.aspx?PostID=32105
After changing the code to lowercase show() the following happens:
in IE:
When clicking on the context menu, I can trace the code into the Toggle() javascript function. However I get a Object Required exception back and the code then shows me the following:
function anonymous() {
var returnValue = this.Show.apply(this,arguments);return returnValue;
}
where this references the dialog popup control.
in FireFox:
1. when clicking on the context menu the popup control is displayed fine, but the context menu does not disappear until I click on the popup itself.
2. when I click the close button on the popup nothing happens.