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.
Printable View
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.
JavaScript, PHP, CGI...? Would help if we knew what language you wanted it in.
Sorry bro,
Javascript would be prefered language to do this in.
Thanks.
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>