Loading Data from Text File into an HTML Drop Down Box

A

Al-Bot

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!!!
 
T

Thomas 'PointedEars' Lahn

Al-Bot said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top