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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:21:14+00:00 2026-05-14T15:21:14+00:00

I have this code which depends on this javascript from dynamic drive: http://dynamicdrive.com/dynamicindex16/formdependency.htm Its

  • 0

I have this code which depends on this javascript from dynamic drive:
http://dynamicdrive.com/dynamicindex16/formdependency.htm
Its a form dependency manager. Which will show or hide elements depending on what you choose from the forms that are revealed:

I don’t know why but If I alter the code from this:

<td>
       <label>ID Number<input type="checkbox" name="id" class="DEPENDS ON info BEING student"></label>
           </td>
        </tr>

To this:

    <td>
    <input type="checkbox" name="id" class="DEPENDS ON info BEING student"><label>ID Number</label>
       </td>
    </tr>

Note: The only change that I did here is to transfer the label from the left side of the checkbox to the right side so that they will look better.
But when I do this. The labels will be visible even if I did not yet click on the button that will make it visible(but without the checkboxes).

And when I click on that button, that’s the only time when the checkbox will appear on the left side of the labels.

The checkbox is ok, but the label is not. And the javascript is working properly.
What do I do so that the checkbox and label will go together?

  • 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-14T15:21:14+00:00Added an answer on May 14, 2026 at 3:21 pm

    I think the simplest solution is to leave the <label> tag in front of the <input> tag and just move the text to the right of it:

    <td>
    <label><input type="checkbox" name="id" class="DEPENDS ON info BEING student">ID Number</label>
       </td>
    </tr>
    

    Or you can use SLaks answer and add an id attribute to the <input> tag and a matching for attribute to the <label> tag like so (so that the text toggles the checkbox):

    <td>
    <input type="checkbox" name="id" class="DEPENDS ON info BEING student" id="example"><label for="example" class="DEPENDS ON info BEING student">ID Number</label>
       </td>
    </tr>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code (which is way simplified from the real code): public interface
I have this code which will include template.php file from inside each of these
I have some code which depends on Greenlets, and need to remove this dependency.
I have this code, which selects content types from database, and then build its
I have this code which adds a x number of views to a Multiview
I have this code which does the trick: #include <stdio.h> int main() { int
I have this code which is called at an onChange event of an function
I have this code which gets WP posts, but it gets all the posts
I have this code which compiles and works as expected: class Right {}; class
I have this code which should create a splash image with either no animation

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.