Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6755437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:24:00+00:00 2026-05-26T13:24:00+00:00

To dumb it down, I have the following code highlighting my exact problem: <!DOCTYPE

  • 0

To dumb it down, I have the following code highlighting my exact problem:

<!DOCTYPE html><html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script>
function updateR1(){
    if (c1.checked){
        r1.style.visibility='hidden';
    }
    else{
        r1.style.visibility='visible';
    }
}
function updateR2(){
    if (c2.checked){
        r2.style.display='none';
    }
    else{
        r2.style.display='table-row';
    }
}
</script>
</head>
<body>
    <table>
        <tr id="r1">
            <td>visibility</td>
        </tr>
        <tr id="r2">
            <td>display</td>
        </tr>
    </table>
    <div>
        <input id="c1" type=checkbox onchange="return updateR1();">Hide row 1</input>
        <input id="c2" type=checkbox onchange="return updateR2();">Hide row 2</input>
    </div>
</body>
</html>

Working example > http://s.supuhstar.operaunite.com/s/content/testHideShow.htm

In Opera, Chrome, IE, and Safari, the first checkbox makes the top row visible or invisible, and the second checkbox makes the second row compressed/invisible or extended/visible. However, in Firefox, neither of these work. Why not? I’ve tried many variations of this, including writing the raw script in the onchange attribute and using other event attributes, but it always works on everything BUT Firefox.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:24:00+00:00Added an answer on May 26, 2026 at 1:24 pm

    I am surprised that it’s working on other browsers…but firefox is not executing your JS for the right reasons…it’s wrong. Here is how you JS functions should be:

        function updateR1(){
        if (document.getElementById("c1").checked){
            document.getElementById("r1").style.visibility='hidden';
        }
        else{
            document.getElementById("r1").style.visibility='visible';
        }
    }
    function updateR2(){
        if (document.getElementById("c2").checked){
            document.getElementById("r2").style.display='none';
        }
        else{
            document.getElementById("r2").style.display='table-row';
        }
    }
    

    BTW, use Firebug for firefox….your life will be heaven 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone actually think this is a good reason to Dumb down your code?
Maybe this is a dumb question, but I have the following behavior in Visual
I have the following basic classes (cut down for this question): public class Parent
I'm trying to wrap my head around this concept. Can you dumb this down
Me again with a dumb question/scenario I need advice on. I have the following
I have a problem when converting a static html table to one which is
Dumb question. Lets say I have a bunch of person objects with their fields
I have a (potentially dumb) question about the C++ STL. When I make a
I am learning Ruby on Rails and I have a dumb question about the
I know this is kinda dumb, but... If I have a php script that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.