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

When javascript disabled then what?

6 Answers 72 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 2
Doug asked on 20 Oct 2009, 12:36 PM
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 ?

 

 

 

6 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 20 Oct 2009, 01:08 PM
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.
0
Doug
Top achievements
Rank 2
answered on 20 Oct 2009, 03:06 PM
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.

 

0
Doug
Top achievements
Rank 2
answered on 21 Oct 2009, 02:10 PM
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.
0
Doug
Top achievements
Rank 2
answered on 21 Oct 2009, 03:04 PM
And to be fair 
 AccessibilityMode property to true would not change  the fact that there is no javascript to do the post back :(
0
Doug
Top achievements
Rank 2
answered on 22 Oct 2009, 10:02 AM
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
0
Paul
Telerik team
answered on 22 Oct 2009, 01:23 PM
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.
Tags
ComboBox
Asked by
Doug
Top achievements
Rank 2
Answers by
Simon
Telerik team
Doug
Top achievements
Rank 2
Paul
Telerik team
Share this question
or