Results 1 to 4 of 4

Thread: load combo from file

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Minnesota
    Posts
    830

    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.

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    JavaScript, PHP, CGI...? Would help if we knew what language you wanted it in.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Minnesota
    Posts
    830

    sorry

    Sorry bro,
    Javascript would be prefered language to do this in.

    Thanks.

  4. #4
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    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>
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width