473,770 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7074
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3525
by: Guy Hocking | last post by:
Hi there, I have a problem in my ASP/SQL Server application i am developing, i hope you guys can help. I have a ASP form with list boxes populated by SQL tables. When a user selects a value in a list box and submits the form the value is put into a session variable and the relevant page is displayed (in accordance to one of the list boxes). The page is then displayed with the relevant SQL data. So far i have got the
4
2168
by: dmiller23462 | last post by:
I'm trying to create a submission page for users to request PC/LAN Access....If they select "Yes" in the field asking about if they need Non Standard Software, I want several other HTML fields to become visible....If they keep the dropdown box at "No" (default) then I want to submit the form "as is", keeping the inapplicable HTML fields hidden....I'm trying an "if statement" in ASP....Here's my code....I'm thinking that the if statement...
1
2061
by: David | last post by:
Hi, I have a webpage where I want to have a select list which the user can select between two different pictures, and then the chosen picture loads onto the html page, but without having to reload the actual page. At the moment, what I have is a select list as shown below: <form name="orders"> <select name="picture" size="1"> <option value="pic1.jpg">Picture 1</option> <option value="pic2.jpg">Picture 2</option>
22
3338
by: Luke | last post by:
Elements with name attribute: form, input, textarea, a, frame, iframe, button, select, map, meta, applet, object, param, img (if you know more reply...) Methods of addresing html elements: <form name="myform"> <input name="myinput" /> </form> 1. var input = document.forms.myform.myinput;//from nn3+ 2. var input = document.forms.myinput;//from nn3+
6
13024
by: Chris Fink | last post by:
Does anyone know it is possible to include a small image(.gif .jpeg) within a <SELECT><option> so that the user would see the option text as well as a little image(icon) in the option? I know this is not an ASP.NET related question, but I know this group is knowledgeable and quick with responses. Thanks
1
1945
by: niftyhawk | last post by:
Hi, Consider the following html EMBEDDED in a php variable say contents <html><body><form name="xyz" method="post" action="xyz.php"><select name=ListID><option value="T80240">BOOKSLIST</option><option value="T80238">LIST TEST</option><option value="T80239">NEW TEST</option><option value="T80236">T80233</option><option value="T80237">T80233</option><option value="T80235">TEST LIST</option><option
4
2275
by: Ian Richardson | last post by:
Hi, The function I've put together below is a rough idea to extend a SELECT list, starting from: <body> <form name="bambam"> <select id="fred"> <option value="1">1</option> <option value="2">2</option>
6
1771
by: nasirmajor | last post by:
Dear all, a simple quetion as usual I have a html select list. e.g <select class="text" name="bmonth" runat="server" id="bmonth"> <option selected="selected" value="0"></option> <option value="1">January</option> <option value="2">February</option> <option value="3">March</option> <option value="4">April</option>
2
1964
by: pedalpete | last post by:
Hi All, I find this incredibly strange, but ie7 my html select list is being blocked by the pop-up blocker. Not sure why this is, and so far doing a search hasn't pointed me to an answer. IE6 is fine. I know I could just change the security settings, but this is more for other users than for my own use. Here's the code I'm using, but I don't see any problems in it, and eclipse doesn't display any errors. Please don't tell me...
0
9432
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10232
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7420
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3974
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2822
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.