Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   HTML Select statement option list (http://www.velocityreviews.com/forums/t158013-html-select-statement-option-list.html)

Steve Wright 05-13-2004 05:10 AM

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





Toby A Inkster 05-13-2004 06:47 AM

Re: HTML Select statement option list
 
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


David Dorward 05-13-2004 06:50 AM

Re: HTML Select statement option list
 
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/>


All times are GMT. The time now is 02:23 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


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