473,326 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Loading Data from Text File into an HTML Drop Down Box

Hey to all!

How can I load data from a simple .txt file into a drop down box using
HTML or javascript. I have this:

<select name="Soup_1">
<option value="Soup Choice 1">-------------- Choice 1 --------------
<option value="CREAM OF BROCCOLI">Cream of Broccoli
<option value="FRENCH ONION W/ CROUTONS">French Onion W/ Croutons
<option value="HAMBURGER TOMATO SOUP">Hamburger Tomato
<option value="LOW SODIUM CHICKEN RICE">Low Sodium Chicken Rice
<option value="LOW SODIUM BEEF BARLEY">Low Sodium Beef Barley
<option value="LOW SODIUM BEEF NOODLE">Low Sodium Beef Noodle
<option value="SPLIT PEA">Split Pea
</select>

This list will grow and I would rather not have it in the webpage it's
self, I would like the 'Soups" loaded from a text file. How can I do
this?

THANK YOU!!!

Dec 23 '05 #1
1 3218
Al-Bot wrote:
How can I load data from a simple .txt file into a drop down box using
HTML or javascript. [...]
Try XMLHttpRequest. Note that this will prevent all customers with absent
support for client-side scripting or XMLHttpRequest from ordering anything,
so you definitely want to implement a server-side alternative for them.
THANK YOU!!!


You're welcome. Please do no SHOUT.
PointedEars
Dec 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dmiller23462 | last post by:
Hey guys.... I put an error-handling in my page and have it posted at the complete end of the code, see below(when people were putting in 's I was getting the delimiter errors). Great, I...
0
by: Leigh | last post by:
I am building a data entry application using Java servlets. I had hoped to use drop down boxes to provide the user with data entry selections pulled from a database, but am now questioning, given...
10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
1
by: SABmore | last post by:
I have the following code that populates 3 independent drop-down boxes with data from arrays. From there the user can select a value from a drop-down list, or input data into a text box. The user...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
1
by: lantamer | last post by:
Hi I need to make script that creates drop-down list from text file (new line in text file – new line in drop-down list). Somebody told me that I should use Ajax and XMLHttpRequest for that, so I...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
7
by: psybert | last post by:
Hello everyone, Long time lurker, first time poster. I'm a beginner coder, and I've taught myself everything with the help and expertise of users and websites like this one. I normally figure out...
1
by: psybert | last post by:
(cross posted from JavaScript forum) Hello everyone, Long time lurker, first time poster. I'm a beginner coder, and I've taught myself everything with the help and expertise of users and websites...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.