|
-
Apr 26th, 2002, 02:48 PM
#1
Thread Starter
Fanatic Member
load combo from file
Is it possible to load a combobox with info from a file?
If so can someone send me syntex.
The file would site on the server somewhere.
Thanks in advance.
-
Apr 26th, 2002, 06:55 PM
#2
Stuck in the 80s
JavaScript, PHP, CGI...? Would help if we knew what language you wanted it in.
-
Apr 26th, 2002, 08:27 PM
#3
Thread Starter
Fanatic Member
sorry
Sorry bro,
Javascript would be prefered language to do this in.
Thanks.
-
Apr 27th, 2002, 10:23 AM
#4
Fanatic Member
You cant load any data from an external file using a client-side language.
If you have an ASP capable web-server you can use Client-Side JScript or VBScript to read the data into the combo box
Code:
<select>
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile(Server.MapPath("data.dat"), 1)
response.write "<option>" & f.readline & "</option>" & vbcrlf
f.Close
Set f=Nothing
Set fs=Nothing
%>
</select>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|