Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Re: CuteEditor_OnInitialized does not get fired in Safari and Chrome Browsers
Re: CuteEditor_OnInitialized does not get fired in Safari and Chrome Browsers
12-17-2010, 8:55 PM
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: CuteEditor_OnInitialized does not get fired in Safari and Chrome Browsers
Reply
Quote
Hi sanjay.joshi,
Try the example below
<%@ Page Language=
"C#"
%>
<%@ Register Namespace=
"CuteEditor"
Assembly=
"CuteEditor"
TagPrefix=
"CE"
%>
<!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 id=
"Head1"
runat=
"server"
>
<title>Untitled Page</title>
</head>
<script runat=
"server"
>
public
string
loaderName;
protected
override
void
OnInit(EventArgs e)
{
base
.OnInit(e);
System.Web.HttpBrowserCapabilities browser = Request.Browser;
string
browserName = browser.Browser;
switch
(browserName)
{
case
"IE"
:
loaderName =
"IE_Loader"
;
break
;
case
"Firefox"
:
loaderName =
"Gecko_Loader"
;
break
;
case
"AppleMAC-Safari"
:
loaderName =
"Safari_Loader"
;
break
;
case
"Opera"
:
loaderName =
"Opera_Loader"
;
break
;
default
:
break
;
}
}
</script>
<script src=
"CuteSoft_Client/CuteEditor/Scripts/spell.js"
></script>
<script src=
"CuteSoft_Client/CuteEditor/Scripts/<%=loaderName %>/Loader.js"
></script>
<body>
<form id=
"form1"
runat=
"server"
>
<asp:Wizard ID=
"Wizard1"
runat=
"server"
>
<WizardSteps>
<asp:WizardStep ID=
"WizardStep1"
runat=
"server"
Title=
"Step 1"
>
</asp:WizardStep>
<asp:WizardStep ID=
"WizardStep2"
runat=
"server"
Title=
"Step 2"
>
<CE:Editor ID=
"editor1"
runat=
"server"
/>
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</form>
</body>
</html>
<script>
function CuteEditor_OnInitialized(editor)
{
alert(
"this is a test"
);
}
</script>
Regards,
Ken
View Complete Thread