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 6645861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:20:29+00:00 2026-05-26T00:20:29+00:00

I am using custom check box idea Ryan Fait’s Idea Where you can use

  • 0

I am using custom check box idea

Ryan Fait’s Idea

Where you can use custom images in order to create custom check boxes. But I am unable to make the check box disappear, and just have the regular box. Example image here
Notice that the checkboxes are still there...

Here is my code..

  <div id="scheduleContainer">
      <table>
       <tr>
        <!--table header-->
       </tr>
       <tr>
        <td>                                            
<h:selectBooleanCheckbox value="#{schedules[scheduleName][0]}" /><label> 12:00AM</label>
</td>

    </div>

inside the css

#scheduleContainer .checkbox {
    width: 25px;
    height: 20px;
    padding: 0px;
    background: url(../img/schedule-check.gif) no-repeat;
    display: none;
    margin: 0px;
    border: 1px solid black;
    clear: left;
    float: left;
}

Also given was the js file. Am i using this correctly?

/*
CUSTOM CHECK BOXES - Derived from script by Ryan Fait at
http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/ 
*/

var checkboxHeight = "20";

/* No need to change anything after this */


document.write('<style type="text/css">.styledGroup input { display: none; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }</style>');

var Custom = {
    init: function() {
        var inputs = document.getElementsByTagName("input"), span = Array(), textnode, option, active;
        for(a = 0; a < inputs.length; a++) {
            if(inputs[a].type == "checkbox") {
                span[a] = document.createElement("span");
                span[a].className = inputs[a].type;

                if(inputs[a].checked == true) {
                    position = "0 -" + (checkboxHeight*2) + "px";
                    span[a].style.backgroundPosition = position;
                }
                inputs[a].parentNode.insertBefore(span[a], inputs[a]);
                inputs[a].onchange = Custom.clear;
                if(!inputs[a].getAttribute("disabled")) {
                    span[a].onmousedown = Custom.pushed;
                    span[a].onmouseup = Custom.check;
                } else {
                    span[a].className = span[a].className += " disabled";
                }
            }
        }
        document.onmouseup = Custom.clear;
    },
    pushed: function() {
        element = this.nextSibling;
        if(element.checked == true && element.type == "checkbox") {
            this.style.backgroundPosition = "0 -" + checkboxHeight*3 + "px";
        } else if(element.checked != true && element.type == "checkbox") {
            this.style.backgroundPosition = "0 -" + checkboxHeight + "px";
        }
    },
    check: function() {
        element = this.nextSibling;
        if(element.checked == true && element.type == "checkbox") {
            this.style.backgroundPosition = "0 0";
            element.checked = false;
        } else {
            if(element.type == "checkbox") {
                this.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
            } 
            element.checked = true;
        }
    },
    clear: function() {
        inputs = document.getElementsByTagName("input");
        for(var b = 0; b < inputs.length; b++) {
            if(inputs[b].type == "checkbox" && inputs[b].checked == true && inputs[b].className == "styled") {
                inputs[b].previousSibling.style.backgroundPosition = "0 -" + checkboxHeight*2 + "px";
            } else if(inputs[b].type == "checkbox" && inputs[b].className == "styled") {
                inputs[b].previousSibling.style.backgroundPosition = "0 0";
            }
        }
    }
}
window.onload = Custom.init;
  • 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-26T00:20:31+00:00Added an answer on May 26, 2026 at 12:20 am

    Just apply CSS display: none; on the HTML generated by <h:selectBooleanCheckbox>.

    E.g.

    <h:selectBooleanCheckbox style="display: none;" />
    

    or

    <h:selectBooleanCheckbox styleClass="hide" />
    

    with

    .hide { 
        display: none; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need to create a custom DNS name server using C which will check against
I am trying to use these custom MacOSX-style check boxes on my site (it's
When using custom assemblies in a visual studio project. How does one check in
I'm using custom renderer on JList, but none of components rendered are accessible. list.setCellRenderer(new
is there a way to style the radio button and checkbox using custom images.
I want read-only check boxes to be greyed out, but display their checked/unchecked status
I'm using a custom validator to check a field is not empty if a
When using custom template for Login control , if we add control with ID
Background : I am currently using custom controls within my C# project (basic controls
I have been using custom swc based components for my new flash game. I

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.