Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Loading Data from Text File into an HTML Drop Down Box

Reply
Thread Tools

Loading Data from Text File into an HTML Drop Down Box

 
 
Al-Bot
Guest
Posts: n/a
 
      12-23-2005
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!!!

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      12-23-2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
Auto Drop down a Drop Down List xxbmichae1@supergambler.com Javascript 5 11-23-2005 01:35 AM
Using ASP to process drop-down box data into SQL statement =?Utf-8?B?S2l3aU5FVCB1ay5nZW9jaXRpZXMuY29tL2hhcm9vbm5ldDIwMDIv?= ASP .Net 1 11-13-2005 05:29 PM
New to .NET, can I have one drop down box control the data of another drop down box using a database? SirPoonga ASP .Net 2 01-07-2005 10:44 PM



Advertisments