This is a migrated thread and some comments may be shown as answers.

IE 7 Toolbar Missing

4 Answers 77 Views
Editor
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 18 Jan 2010, 04:13 AM
I have a page where there are multiple editors on the screen, on the initial load only one editor is visible to the user and using javascript the divs style are changed from display: none to display: block in IE 7 when the editor is initially hidden and then told to display the toolbar is missing.  Works in FF/Chrome/IE 8

Is there a way to have the toolbar show up for IE 7 in this instance:

<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title></title
    <script type="text/javascript"
        function ChangeDisplay(elm) { 
            var div = document.getElementById("Wrapper2"); 
            if (elm.value == "0") { 
                div.style.cssText = "display: none;"
            } 
            else { 
                div.style.cssText = "display: block;"
            } 
        } 
    </script> 
</head> 
<body> 
    <form id="form1" runat="server"
    <asp:ScriptManager ID="SM" runat="server"></asp:ScriptManager> 
            <asp:ListBox ID="LB1" runat="server" onchange="ChangeDisplay(this);" Rows="1" SelectionMode="Single"
            <asp:ListItem Text="Hide" Value="0"></asp:ListItem> 
            <asp:ListItem Text="Show" Value="1"></asp:ListItem> 
        </asp:ListBox> 
        <div id="Wrapper"
        <div style="float: left; padding-top: 2px;"
            <telerik:RadEditor ID="RadEditor1" runat="server"  Skin="Default" Height="200" Width="610"   ContentFilters="RemoveScripts" EnableResize="false" EditModes="Design"
            </telerik:RadEditor> 
        </div> 
        </div> 
        <div id="Wrapper2" style="display: none;"
        <div style="float: left; padding-top: 2px;"
            <telerik:RadEditor ID="RadEditor2" runat="server"  Skin="Default" Height="200" Width="610" ContentFilters="RemoveScripts" EnableResize="false" EditModes="Design"
            </telerik:RadEditor> 
        </div> 
        </div> 
    </form> 
</body> 
</html> 

4 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 18 Jan 2010, 04:15 AM
Actually, multiple editors has nothing to do with it, just when first loaded not displayed, the toolbar fails to show up on display.
0
Accepted
Rumen
Telerik team
answered on 18 Jan 2010, 03:36 PM
Hi John,

This is a browser specific problem in IE7. I was able to fix it by replacing this line

div.style.cssText = "display: block;";

withi this one:

div.style.display = "";


Here is the update code:

<script type="text/javascript">
    function ChangeDisplay(elm) {
        var div = document.getElementById("Wrapper2");
        if (elm.value == "0") {
            div.style.cssText = "display: none;";
        }
        else {
            //div.style.cssText = "display: block;";
            div.style.display = "";
        }
    }
</script>


Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
John
Top achievements
Rank 1
answered on 18 Jan 2010, 04:29 PM
Excellent, works great, thanks!
0
mohammed
Top achievements
Rank 1
answered on 08 Jun 2010, 04:27 PM
div.style.cssText="";
Tags
Editor
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Rumen
Telerik team
mohammed
Top achievements
Rank 1
Share this question
or