Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > HTML Select statement option list

Reply
Thread Tools

HTML Select statement option list

 
 
Steve Wright
Guest
Posts: n/a
 
      05-13-2004
Hi all,
I suspect that I will need Javascript to make this work which is why I am
asking the question here! (and also crossposting)

Can someone tell me if it is possible to have an HTML select statement that
gets its options from a text file.

<select name="contract">
<option value="">Select Contract</option> |
<option value="RS-330">RS-330 Northern</option> | these
bits should come fron an external file
<option value="RS-331">RS-331 Southern</option> |
</select></td>

Clear??

Steve




 
Reply With Quote
 
 
 
 
Toby A Inkster
Guest
Posts: n/a
 
      05-13-2004
Steve Wright wrote:

> I suspect that I will need Javascript to make this work which is why I am
> asking the question here! (and also crossposting)
>
> Can someone tell me if it is possible to have an HTML select statement that
> gets its options from a text file.


Yes it is, but Javascript is probably not the best way to do it. Try
comp.lang.perl or comp.lang.php.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      05-13-2004
Steve Wright wrote:

> Can someone tell me if it is possible to have an HTML select statement
> that gets its options from a text file.


While you might be able to populate it using JavaScript and httpxml, doing
so will be unreliable and only work in some instances of MSIE and Mozilla
(and you'll need different techniques for each of them).

You would be much better of generating it using some server side tool. If
you are using forms then you should have the capability to run such a tool
already. The specifics depend on the server platform.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
 
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
programmatically select an option in "select" box in html rvelosoo Javascript 1 08-13-2008 10:53 AM
Removing select option removes entire select Nick Spacek Javascript 1 06-21-2006 04:45 PM
modify the default option in a select changing another select WebRaster Javascript 1 10-26-2005 10:36 AM
Dynamically update SELECTED option in option list Mark Kolber Javascript 4 01-01-2005 02:07 PM
Selection from One SELECT changes selected option of another SELECT? J. Hall HTML 2 04-21-2004 05:36 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57