HTML Select statement option list

Discussion in 'HTML' started by Steve Wright, May 13, 2004.

  1. Steve Wright

    Steve Wright Guest

    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
     
    Steve Wright, May 13, 2004
    #1
    1. Advertising

  2. 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
     
    Toby A Inkster, May 13, 2004
    #2
    1. Advertising

  3. 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/>
     
    David Dorward, May 13, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. J. Hall
    Replies:
    2
    Views:
    1,073
    Jeff Thies
    Apr 21, 2004
  2. Mark Kolber
    Replies:
    4
    Views:
    348
  3. WebRaster
    Replies:
    1
    Views:
    271
    Francisco Spaeth
    Oct 26, 2005
  4. Replies:
    7
    Views:
    261
  5. rvelosoo
    Replies:
    1
    Views:
    341
    Bart Van der Donck
    Aug 13, 2008
Loading...

Share This Page