[thelist] To Application or Not ..

Ashok Hariharan listman at hazard0us.org
Wed Jan 22 10:26:01 CST 2003

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

Actually that 4guysfrom... link that you mentioned
shows a way around this very problem, which means
you can eliminate the loop.

Assume that your admin form has generated a HTML text list
instead of plain text list :

<select name="OtherLang1">
<option value="en">english</option>
<option value="fr">french</option>
<option value="it">italian</option>

And you have logged in with the language selected as italian...
(so strLoggedinLang = "it")

I guess you would read the combox html into a string variable...
using :
and then fso.readall into a string variable (lets call the
variable containing the HTML text list as "strCombo")

Now you can just do a replace of <option value="it"> in the strCombo
string using the vbscript Replace() function, something like :

Replace(strCombo, "<option value="""+strLoggedinLang+"">",
      "<option selected value="""+strLoggedinLang+"">")

So you can do away with that while loop and the makeOpt() stuff...

I am sure a similar method will work for multiple select list boxes.



Ashok Hariharan

More information about the thelist mailing list