HTML Select statement option list

S

Steve Wright

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
 
T

Toby A Inkster

Steve said:
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.
 
D

David Dorward

Steve said:
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.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top