<%@ Control Language="C#" AutoEventWireup="true" CodeFile="HtmlEditorWrapper.ascx.cs" Inherits="AIO.WITWeb.HtmlEditorWrapper" %>
<asp:DropDownList ID="EditorTypeDropDownList" runat="server" AutoPostBack="true" Visible="false" OnSelectedIndexChanged="EditorTypeDropDownList_OnSelectedIndexChanged">
<asp:ListItem Text="FCKEditor" Value="~/UserControls/FCKEditorPage.aspx"></asp:ListItem>
<asp:ListItem Text="FreeTextBox" Value="~/UserControls/FreeTextBoxPage.aspx" Selected="True"></asp:ListItem>
<asp:ListItem Text="CuteEditor" Value="~/UserControls/CuteEditorPage.aspx"></asp:ListItem>
</asp:DropDownList>
<Ajax:UpdatePanel ID="EditorIFrameUpdatePanel" runat="server" UpdateMode="Conditional" RenderMode="Block">
<Triggers>
<Ajax:AsyncPostBackTrigger ControlID="EditorTypeDropDownList" EventName="SelectedIndexChanged" />
</Triggers>
<ContentTemplate>
<asp:HiddenField ID="HtmlEditorHiddenField" runat="server" />
<AIO:IFrame ID="EditorIFrame" runat="server" Height="350px" Scroll="No" Width="100%" />
</ContentTemplate>
</Ajax:UpdatePanel>
<script type="text/javascript">
var iframeids=["EditorIFrame"]
var iframehide="yes"
function dyniframesize()
{
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++)
{
if (document.getElementById)
{
dyniframe[dyniframe.length] = document.getElementById(iframeids[i]);
if (dyniframe[i] && !window.opera)
{
dyniframe[i].style.display="block"
if (dyniframe[i].contentDocument && dyniframe[i].contentDocument.body.offsetHeight)
dyniframe[i].height = dyniframe[i].contentDocument.body.offsetHeight;
else if (dyniframe[i].Document && dyniframe[i].Document.body.scrollHeight)
dyniframe[i].height = dyniframe[i].Document.body.scrollHeight;
}
}
if ((document.all || document.getElementById) && iframehide=="no")
{
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}
if (window.addEventListener)
window.addEventListener("load", dyniframesize, false)
else if (window.attachEvent)
window.attachEvent("onload", dyniframesize)
else
window.onload=dyniframesize
</script>