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

  • Home
  • SEARCH
  • 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 806073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:11:14+00:00 2026-05-15T00:11:14+00:00

Hi i am developing a web app.I am retrieving options of the select box

  • 0

Hi i am developing a web app.I am retrieving options of the select box from database and i want to write these records to selectbox.My page structure is like that:

main.php=>there is a selectbox in this page <select id="my_select"></select>

retrieve_data.php=>i make a ajax call to this page and this page gets the phone numbers from the db and responses the data to main.php.

i get the data from the retrieve_data.php but when wanted to write these response to selectbox it fails.only empty selectbox appears.

My response like his:<option>blabla</option>……

and i wrote it like this: $("#my_select").html(response);

i alerted the response before writing in to selectbox and it alerts right options but when i tried to write them into selectbox it fails.can anyone help me thanks for advance…

  • 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-15T00:11:15+00:00Added an answer on May 15, 2026 at 12:11 am

    I’m going to go out on a limb and assume that the response is coming back in the form of a single member array. That would explain why the alert() shows the response, but it is not being inserted.

    So, try this:

    $("#my_select").html( response.join('') );
    

    EDIT:

    <option> tags in output were misspelled.

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

Sidebar

Related Questions

we're developing a web app to cover all aspects of a printing company from
I learning Python (coming from a dotnet background) and developing an app which interacts
I'm current developing web-app that allows a user to associate their account with their
I'm developing web app that user can save his/her work to server. The data
When developing a web app, in my case a ASP.NET MVC app, but this
im developing a web app to manager jobs, curriculum and etc... For example in
I've been developing web applications for 2 years now, and have been into simpler
I'm developing an asp.net intranet website with a ActiveDirectoryMembershipProvider and a SqlProfileProvider. One of
I am about to begin development of a new website and have been doing

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.