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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:20:09+00:00 2026-05-27T16:20:09+00:00

Currently I’m making a form with JSP that I need to have a couple

  • 0

Currently I’m making a form with JSP that I need to have a couple fields display, or not display depending on a check box value. Since I’m new to JSP, I’m wondering is it possible in JSP to do this without javascript? (Asking this question just in the case a user goes to fill out the form fields with js disabled, whats my fallback?)

  • 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-27T16:20:09+00:00Added an answer on May 27, 2026 at 4:20 pm

    Your first step would be to replace those checkboxes by submit buttons. You can’t let a checkbox submit the form without using JavaScript onclick="submit()". You can if necessary throw in some CSS to make those buttons to look like a checkbox by removing/changing the background/border/inset/font.

    After having changed that, just let JSP generate the desired HTML conditionally using JSTL <c:if> tags and like.

    E.g.

    <input type="submit" class="checkbox" value="${param.showFoo ? 'x' : ' '}" /> toggle foo
    <input type="hidden" name="showFoo" value="${not param.showFoo}" />
    
    <c:if test="${param.showFoo}">
        <label for="foo">Foo</label>
        <input type="text" id="foo" name="foo" value="${fn:escapeXml(param.foo)}" />
    </c:if>
    

    with CSS something like as

    input[type=submit].checkbox {
        width: 14px;
        height: 14px;
        margin: 0;
        padding: 0;
        border: 1px gray solid;
        background: none;
        font: sans-serif 10px;
        line-height: 10px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I have a class that looks like this: public class MyClass : IMyClass
Currently, I have something like: public partial class Form1 : Form { delegate void
Currently I have alot of information that are in several different divs. I want
I need a function that will clean a strings' special characters. I do NOT
currently I have following code: home.php <form name='myformname' id='myformid'> <input type='text' name='mytext1' value='abc'> <input
Currently when the user presses tab in the qty text box it does not
Currently I have a UITableview, I have enough data that cannot be shown entirely
Currently the HashSet<T> constructor that allows you to define your equality comparison yourself is
Currently I have a DetailsView attached to a GridView. When you select an item
Currently, I have: <html> <div class=yes1><span><img src=img></span></div> </html> <script> var x = ='yes1' var

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.