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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:58:46+00:00 2026-06-03T19:58:46+00:00

I am setting name of few countries List in Session Object. I need to

  • 0

I am setting name of few countries List in Session Object. I need to populate a dropdown in my JSP using this List and also add the Flag Images before each country name in the select option dynamically.
The below code does not work:

    <select id="refSelect" onChange="refreshRefList();" name='refSelect'>
     <c:forEach var='flag' items="${sessionScope.flagList}">
      <option value="${flag}">
        <img src="./images/${flag}.PNG"/> <c:out value="${flag}" />
      </option>
     </c:forEach>
    </select>

I also tried to achieve this using CSS using below link but it failed for session List and only works in Firefox browser:

  • How to add a images in select list

Seems like normal default Dropdown control does not support images. Can anyone help me to achieve this using Javascript/CSS/Custom taglib. I don’t want to use jQuery in my codes.

  • 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-03T19:58:49+00:00Added an answer on June 3, 2026 at 7:58 pm

    Add a textbox,

    create a

    <ul id="country_dropdown"><li><img src="urimage.png"/>Country</li>...</ul>
    

    on focus on the textbox, show country_dropdown, on blur or on click on li hide the ul.

    no jquery needed to achieve that.

    also the use div instead of textbox and maintain the value as hidden.

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

Sidebar

Related Questions

When I'm setting up a MySQL table, it asks me to define the name
Assume I have a such json setting: { page:1, items:[ { name: 'item1', id:1
I am setting up a build environment for few projects. Each project has more
I am developing a MAC application wherein I have to decode few images using
This is a followup to a question I posted a few days ago. basically,
I am using StyleCop with Visual Studio. Whenever i add a new file it
I have been playing with setting up different relationships for a few hours now
Few questions: I'm using CI and JQuery AJAX. In my code below, I assemble
What I need to do is that I have few files (txt) about 2GB
I'm new to this, and I'm using datamapper and sinatra to build a basic

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.