Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

Load SELECT options from a file

How can I fill a SELECT element from a configuration file.

5:50 pm on Aug 27, 2006 (gmt 0)

New User

10+ Year Member

joined:Oct 5, 2005
votes: 0

Is it possible to load all the options for a SELECT element, from a configuration file? I would like the administrator to be able to add or edit options, without having to edit the HTML.
6:44 am on Aug 28, 2006 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 26, 2004
votes: 12

Selecting multiple options with a select element...

<select multiple="multiple"></select>

- John

[edited by: JAB_Creations at 6:44 am (utc) on Aug. 28, 2006]

8:55 am on Aug 28, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:July 3, 2006
votes: 0

You'll need to have a server-side script (PHP, ASP...) that reads your config file and generates the HTML to be returned to the client.
9:45 pm on Aug 29, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Sept 4, 2002
votes: 0

If you can teach your administrator just the HTML for the options themselves, you could have the list of options in an include and, if your server allows SSI, you wouldn't need a scripting language...