Disable panels in using javascript only for mozilla

Posted on 2009-04-01
Last Modified: 2012-05-06
Hi all,
           I want to disable the panles in mozilla forefox. I write the following code. It is working fine with IE but it is not working with Firefox. Please help me.

Question by:mannevenu
1 Comment
LVL 19

Accepted Solution

Albert Van Halen earned 500 total points
ID: 24038037
Panels will render themselves as divs.
You cannot disable or enable a div element.

If it's just about disabling input controls inside that div, you have to go trough each element inside the div and set the disabled attribute.
function disableDiv(divID) {
    var div = document.getElementById(divID)
    var fields = div.getElementsByTagName('input');
    for (var i=0; i < fields.length; i++)
        fields[i].disabled = true;

Open in new window


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Filktering Alphabetically 8 32
ASP.NET MVC - Views 3 22
Search Item in Table 2 23
Get checkbox id of the previous one selected 2 17
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question