When javascript disabled then what?

7 posts, 0 answers
  1. doug thompson
    doug thompson avatar
    9 posts
    Member since:
    Mar 2006

    Posted 20 Oct 2009 Link to this post

    Hi
    Just started mocking up some Telerik combo boxes works a treat.
    Disabled Javascript on the browser and the telerik controls are dead in the water.
    I was sure that they were able to 'fall back' to a dumber version.
    At the moment I am adding
    "<noscript><asp:DropDownList  /></noscript>"
     controls on the page which is unwanted duplication but until a solution is found for the Telerik control settings that all I can so.

    I have searched the site for key workds like "javascript disabled", "<noscript>" but get nothing.
    What do I do ?

     

     

     

  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 20 Oct 2009 Link to this post

    Hi doug thompson,

    You could set the AccessibilityMode property to true in this case.

    Greetings,
    Simon
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. doug thompson
    doug thompson avatar
    9 posts
    Member since:
    Mar 2006

    Posted 20 Oct 2009 Link to this post

    hi
    Just found that, now looking for a  quick method to query if Javascript is enabled eg something like...

    <telerik:RadComboBox

     

     

    AccessibilityMode='<%=WhatNoJavaScript() %>'


    Where ideally I talk to the script manager to see what going on, eg can ScriptManager 'Manage' it might have been disabled becase there is no scripting?

     

     


    Thanks in advance
    Doug

    Ps. so glad I can subscribe to replies via RSS, really useful feature.

     

  5. doug thompson
    doug thompson avatar
    9 posts
    Member since:
    Mar 2006

    Posted 21 Oct 2009 Link to this post

    I cannot find the accessiblity mode for
    <telerik:RadPanelBar
    are these solutions spreadic ?

    I used a link in a <noscript> block to post back to the code behind/controller that javascript was not available.
    However this event would fire for google(SEO path) as well as other low tech browsers or for this disabled.
  6. doug thompson
    doug thompson avatar
    9 posts
    Member since:
    Mar 2006

    Posted 21 Oct 2009 Link to this post

    And to be fair 
     AccessibilityMode property to true would not change  the fact that there is no javascript to do the post back :(
  7. doug thompson
    doug thompson avatar
    9 posts
    Member since:
    Mar 2006

    Posted 22 Oct 2009 Link to this post

    Hi, can you tell me what I need to do for menues such as "<telerik:RadPanelBar" ?
    It seems to be that with a lost a javascript there is no possiblity of a Postback and so you have to revert to a classic <a> link.
    Did you find a serverside query for the script manager that I could use to see if scripting was disabled?

    It seems that just setting "AccessibilityMode" it will degrade the control to std asp.net controls and not ones that are independant of Javascript.  Have you tested these control for blind people who use a WebReader tool is the "AccessibilityMode" ok for that.
    But again not all controls have a "AccessibilityMode"

    Are you sure that just setting "AccessibilityMode=True" will cause a full post back without the use of Javascript as I have been using the browser Opera10 that allows features such as Scripting to be fully disabled and you controls just dont work as you suggest.

    Do I need to write my own controls that toggle between yours and dumb controls?
    Thanks
    Doug
  8. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 22 Oct 2009 Link to this post

    Hello doug,

    This can be easily achieved using a simple trick. By default, all panelbar items should be expanded, and you will have to collapse them on the client.

    ASPX:
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <title></title>  
    </head> 
    <body> 
        <form id="form1" runat="server">  
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1">  
        </telerik:RadScriptManager> 
     
        <script type="text/javascript">  
            function pageLoad() {  
                var panel = $find("<%=RadPanelBar1.ClientID %>");  
                for (var i = 0; i < panel.get_allItems().length; i++) {  
                    if (panel.get_allItems()[i].get_items().get_count != 0) {  
                        panel.get_allItems()[i].set_expanded(false);  
                    }  
                }  
            }  
        </script> 
     
        <telerik:RadPanelBar ID="RadPanelBar1" runat="server">  
            <Items> 
                <telerik:RadPanelItem runat="server" Text="Root RadPanelItem1">  
                    <Items> 
                        <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">  
                            <Items> 
                                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 3">  
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                    </Items> 
                </telerik:RadPanelItem> 
                <telerik:RadPanelItem runat="server" Text="Root RadPanelItem2">  
                    <Items> 
                        <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">  
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">  
                            <Items> 
                                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">  
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 3">  
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelItem> 
                        <telerik:RadPanelItem runat="server" Text="Child RadPanelItem 3">  
                        </telerik:RadPanelItem> 
                    </Items> 
                </telerik:RadPanelItem> 
            </Items> 
        </telerik:RadPanelBar> 
        </form> 
    </body> 
    </html> 

    Code-behind:
    using System;  
    using System.Collections.Generic;  
    using System.Linq;  
    using System.Web;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
    using Telerik.Web.UI;  
     
    public partial class _Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            foreach (RadPanelItem item in RadPanelBar1.GetAllItems())  
            {  
                if (item.Items.Count != 0)  
                {  
                    item.Expanded = true;  
                }  
            }  
        }  
    }  
     



    Kind regards,
    Paul
    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017