Solved

disable controls in mozilla firefox using javascript

Posted on 2009-04-01
1
618 Views
Last Modified: 2012-06-21


I used this code but i was unable to disabled the controls in mozilla firefox.
<script type="text/javascript">

function DisableControls(el)

{

    try

    {

        el.disabled = true;

    }

    catch(E){}

    if (el.childNodes && el.childNodes.length > 0) {

        for (var x = 0; x < el.childNodes.length; x++) {

            DisableControls(el.childNodes[x]);

            }

    }

}

DisableControls(document.getElementById("<%=pnlQuestions.ClientID %>"));

</script>

Open in new window

0
Comment
Question by:mannevenu
1 Comment
 
LVL 30

Accepted Solution

by:
third earned 500 total points
ID: 24037555
the code works fine for me both IE and Firefox. make sure you invoke the function after the controls have loaded.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now