(please see attached project)
If I put an AspxHtmlEditor inside Ajax, getting the HTML value at postback is emtpy. This goes only for FireFox not Ms IE.
If its a bug in AspxHtmlEditor, I need a fix asap! :o)
Morten
Steps to Reproduce:
All works fine in MsIE … FireFox (Mozialla) causes the problem below…
- Create new web project
- In the default page, put Ajax Script Manager and an Ajax Update Panel
- Put an AspxHtmlEditor inside the update panel
- Enter som text in the AspxHtmlEditor
- Put a button and on the click event, read the AspxHtmlEditor's HTML value
Actual Results:
AspxHtmlEditor's HTML value is "" (empty)
Expected Results:
The text you entered in 4. (under strps to produce)
Hi,
We've found the following workaround to this issue:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<script type="text/javascript" language="javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
function BeginRequestHandler(sender, args) {
htmlEditor1.Synchronize();
}
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<dxhe:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server" ClientInstanceName="htmlEditor1">
<SettingsImageUpload>
<ValidationSettings AllowedContentTypes="image/jpeg,image/pjpeg,image/gif,image/png,image/x-png">
</ValidationSettings>
</SettingsImageUpload>
</dxhe:ASPxHtmlEditor>
</ContentTemplate>
</asp:UpdatePanel>
Thanks,
Plato
Hi!
We've corrected the previous workaround.
The correct code is the following:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<script type="text/javascript" language="javascript">
function OnClickSubmitButton() {
htmlEditor1.Synchronize();
}
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<dxhe:ASPxHtmlEditor ID="ASPxHtmlEditor1" runat="server" ClientInstanceName="htmlEditor1">
<SettingsImageUpload>
<ValidationSettings AllowedContentTypes="image/jpeg,image/pjpeg,image/gif,image/png,image/x-png">
</ValidationSettings>
</SettingsImageUpload>
</dxhe:ASPxHtmlEditor>
<br/>
<dxe:ASPxButton ID="ASPxButton1" runat="server" Text="ASPxButton">
<ClientSideEvents Click="function(s, e) { OnClickSubmitButton(); }" />
</dxe:ASPxButton>
</ContentTemplate>
</asp:UpdatePanel>
Thanks,
Andrew R
4 months for a fix???
Dear Morten,
We apologize, it took us significant time to provide a complete resolution to this problem. However, it was rather complex and depended on peculiarities of different web browsers. Please try the Public Fix we've just published, and let us know if the new libraries help.
Thanks,
Serge