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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:37:53+00:00 2026-06-18T08:37:53+00:00

Hey can anyone help me out i am trying to display a div on

  • 0

Hey can anyone help me out i am trying to display a div on screen depending on what i select on a drop-down menu

<------------DropdownDiv---------->

    <div id="recordActivityDropdownDiv" style="padding: 5px">
        <h:selectOneMenu id="recordActivityDropdown" style="width:200px;" value="">
            <f:selectItem itemLabel="Email" itemValue="1"/>
            <f:selectItem itemLabel="Letter" itemValue="2"/>                                
        </h:selectOneMenu>  
    </div>

<------------Display this is letter is selected in dropdown menu Div---------->

    <div style="height:100%; width:99%; float:left">
        <div style="padding-top: 15px; padding-left: 5px; width: 20%; float: left;">
        letter:
        </div>
        <div style="height:100%; width:77%; float:left">
            <div style="padding: 5px; float:left;">
                <h:inputText id="letterbox" style="width:200px" value="" />
        </div>              
    </div>
  • 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-06-18T08:37:54+00:00Added an answer on June 18, 2026 at 8:37 am

    As noted in the comments, your code would look a bit like this :

    ...
        <h:selectOneMenu value="#{bean.selectValue} id="recordActivityDropdown" style="width:200px;" value="">
            <f:selectItem itemLabel="Email" itemValue="1"/>
            <f:selectItem itemLabel="Letter" itemValue="2"/>
            <f:ajax listener="#{bean.valueChanged}" update="myGroup" />                                
        </h:selectOneMenu>  
    ...
    
    ...
    <h:panelGroup id="myGroup" style="height:100%; width:99%; float:left">
        <div style="padding-top: 15px; padding-left: 5px; width: 20%; float: left;">
            letter: <h:outputText value="#{bean.selectValue}" />
        </div>
        ...              
    </h:panelGroup>
    ...
    

    This will update (via ajax) the now panelGroup that is your “div”. It will take the value of the selectOneMenu and print it to the div.

    See also :

    • Ajax support In h:selectOneMenu
    • how to get value from <h:selectOneMenu>?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys , Can anyone help me out to add images in folder and
Hey can anyone help me understand how to do an edit method for my
Hey i can't seem to understand this error. I'm trying to select an image
Hey can anyone help me join the 5 tables below into a single query?
Hey guys can anyone help me how can i achieve this kind of help
Hey trying to read stream into image control can any one help also I
hey guys hope you can help me out. I am relatively new to jquery
Hey guys, I'm wondering if anyone can help me extend this bit of code-
Hey can anyone see what wrong with my menu in the while loop it
Hey guys I'm trying to make a GUI which can navigate through JTextAreas when

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.