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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:13:42+00:00 2026-05-29T19:13:42+00:00

I got a form and we changed the structure of how we are passing

  • 0

I got a form and we changed the structure of how we are passing request variables from the jsp to the form bean. Anyway here is an example:

Before I was doing this

jsp:

 <fieldset class="det">
        <legend>Closure Level</legend>
        <input type="checkbox" name="openLevel" >Open</input><br/>
        <input type="checkbox" name="phyCompLevel" >Physically Complete</input><br/>
        <input type="checkbox" name="finCompLevel" >Financially Complete</input>
    </fieldset>

Handler:

if ((form.isOpenLevel() == true) && (form.isFinCompLevel() != true && form.isPhyCompLevel() != true))
        {
            paramBean.addFilter(new DetFilterCriteriaBean("PHYS_COMP_DATE ","is","NULL"));
        }
        if ((form.isPhyCompLevel() == true) && (form.isFinCompLevel() != true && form.isOpenLevel() != true))
        {
            paramBean.addFilter(new DetFilterCriteriaBean("PHYS_COMP_DATE ","is","NOT NULL"));
            paramBean.addFilter(new DetFilterCriteriaBean("FIN_COMP_DATE","is","NULL"));    
        }
        if ((form.isFinCompLevel() == true) && (form.isOpenLevel() != true && form.isPhyCompLevel() != true))
        {
            paramBean.addFilter(new DetFilterCriteriaBean("FIN_COMP_DATE","is","NOT NULL"));
        }

As you can see I was checking which boxes were “checked” to see what to pass to the bean. We are pulling all the variables at once so I cant do any logic in the handler anymore. So what I need to so is do this same type of logic in Javascript as I submit the form. So something like this:

I need to do this condition in javascript:

if ((form.isOpenLevel() == true) && (form.isFinCompLevel() != true && form.isPhyCompLevel() != true))
        {
<input type="hidden" name="filterCriteria('PHYS_COMP_DATE').fieldName" value="PHYS_COMP_DATE"/>
        <input type="hidden" name="filterCriteria('PHYS_COMP_DATE').operation" value="is"/>
        <input type="hidden" name="filterCriteria('PHYS_COMP_DATE').values" value="NULL"/>
       }

If you can point me in the right direction..much appreciated. I dont need all the conditions, just that first one as an example.

  • 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-29T19:13:44+00:00Added an answer on May 29, 2026 at 7:13 pm

    In javascript, to validate if an input type=checkbox is checked, you use the checked attribute. Also, is preferable to use IDs to refer to an HTML’s element from javascript so you can take advantage of the getElementById() function. Example using your code with a little modification:

    <input type="checkbox" id="openLevel" >Open</input><br/>
    ...
    if(document.getElementById('openLevel').checked){
      ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got this form, initialized from the data in a Mysql database entry. If
I've got a Form with some labels on it. From time to time the
I've got an XML structure bound to a WPF form, and have it all
I got this HTML structure: <form> <input class=myTrigger type=radio value=1/> <input class=myTrigger type=radio value=2/>
I've got a form and when the status select list is changed, the status
I have got an iframe that displays a form from an external site,once the
I've got a form where I have two radio buttons and two interchangeable controls
I've got a form that's a few pages long. To traverse the form all
I've got a form inside an <asp:Content> block that is being submitted to a
So I've got a form in my Rails app which uses a custom FormBuilder

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.