[thelist] To Application or Not ..

Michele Foster michele at wordpro.on.ca
Wed Jan 22 06:32:01 CST 2003


----- Original Message -----
From: "Ashok Hariharan" <listman at hazard0us.org>

<tremedous amount of snipping>

> However, i can suggest an improvement to the text file method.
> Instead of  writing the list of data to the text file from the Admin form,
> why
> don't you write it as HTML,
> i.e. instead of  :
> UK
> write it as:
> <select name="countries">
> <option>USA</option>
> <option>UK</option>
> <option>USSR</option>
> </select>

I do need to be able to loop through the values and evaluate them against
the data already in the DB.

This is my code that I'm using ..

 <td width="110" align="center"><select name="OtherLang1">
   <option value="">-- choose one --</option>
Set objFSO = Server.CreateObject( "Scripting.FileSystemObject" )
Set DisplayText =
    While Not DisplayText.AtEndOfStream
  languages = (DisplayText.ReadLine)
  makeOpt languages, languages, str_OtherLang1
Set DisplayText = Nothing
Set objFSO = Nothing

Where "makeOpt" is :

Sub makeOpt( val, txt, testval )
    Response.Write "<option value=""" & val & """"
    If lcase(val)=lcase(testval) Then Response.Write " selected"
    Response.Write ">" & txt & "</option>" & vbcrlf
End Sub

As I have multi-select list boxes as well .. the code for them is :

Sub makeOptnew(val, testval)
    Response.Write "<option value=""" & val & """"
    If InStr(testval, val) Then Response.Write " selected"
    Response.Write ">" & val & "</option>" & vbCrLf
End Sub

I'm not sure if there's a way I can incorporate your suggestion.  I found
this reference last night that shows how to do the same idea with an
Application list which has been stored with the HTML .. until I try it, I'm
not 100% sure how its working.

TIA for your help and everyone else's too.  I'll look at the references and
examples when I get to the office.


More information about the thelist mailing list