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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:19:16+00:00 2026-05-25T21:19:16+00:00

ive created a form in which user will check off checkboxes, select radio buttons,

  • 0

ive created a form in which user will check off checkboxes, select radio buttons, and drop downs in 1.jsp…

i want to use the information from 1.jsp to determine the output of 2.jsp…

jsfiddle for 1.jsp: http://jsfiddle.net/VWczQ/

action="/2.jsp">

now in 2.jsp i have this:

<% if(request.getParameter("extra") != null) { %>           
    <page:cmsElement id="cmsContent" name="/otcmarkets/traderAndBroker/market-data-vendors/wizard-results" />
<% } else if(request.getParameter("all") != null) { %>
    <page:cmsElement id="cmsContent" name="/otcmarkets/traderAndBroker/market-data-vendors/con-all" />
<% } else { %>
    <h1>holy crap everything is null!!!</h1>
<% } %>

when i randomly choose options from the form everything is NULL…

what am i doing wrong?!?

  • 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-25T21:19:17+00:00Added an answer on May 25, 2026 at 9:19 pm

    You seem to be expecting that the id attribute of the HTML input elements is been sent as request parameter name. This is wrong. It’s the name attribute which is been sent as request parameter name. Its value is then the value attribtue which is been set on the named input element.

    So, instead of for example your incorrect check

    if(request.getParameter("extra") != null) {
        // ...
    }
    

    for the following radio button

    <input type="radio" name="choice" value="extranet" id="extra"/>
    

    you need to get the parameter by name choice and test if its value is extranet.

    if ("extranet".equals(request.getParameter("choice"))) {
        // ...
    }
    

    As to the all checkbox, I am confused. It is possible to send the both values, yet you’re checking them in an if-else. Shouldn’t the all be inside the same radio button group? Shouldn’t you remove the else? In any way, the point should be clear. It’s the input elements’ name attribtue which get sent as request parameter name, not the id attribute.

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

Sidebar

Related Questions

I've created a form application in .NET which will be used in the post-commit
I have a select list I've created in a form alter, however, when I
I've created a login submit form in HTML but for some reason user/password autocompletion
I've created my own signup form and creating the user using the Membership class.
i've a form in which user can inser a password in a input text
I have a form which will include some optional questions that need to asked
I need to create an input form that will allow a user to enter
I have a form which instances a new form that I've already created using
I've created a webpage which uses JQuery to redirect the content of a form
I've created a form that stores free text fields into a MySQL database. All

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.