468,765 Members | 1,493 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

HTML Select statement option list

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


Jul 23 '05 #1
2 6909
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

Jul 23 '05 #2
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/>
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by David | last post: by
6 posts views Thread by Chris Fink | last post: by
1 post views Thread by niftyhawk | last post: by
4 posts views Thread by Ian Richardson | last post: by
6 posts views Thread by nasirmajor | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.