Jeg har nedenstående kode og den sætter kun første navn ind. <select name="select2" size="1"> <option selected>-</option> <% strSQL = "SELECT filmtype FROM dropdown ORDER By id" Set objRS = objconn.Execute(strSQL) Do While Not objrs.EOF If NOT objrs("filmtype")="" OR objrs("filmtype")=NULL Then Response.Write "<option value=" & objrs("filmtype") & ">" & objrs("filmtype") & "</option>" else end if objrs.MoveNext Loop %> </select>
<select name="select2" size="1"> <option selected>-</option> <% strSQL = "SELECT filmtype FROM dropdown ORDER By id" Set objRS = objconn.Execute(strSQL) Do Until objRS.EOF If NOT objRS("filmtype")="" OR objRS("filmtype")=NULL Then %> <option value="<% objRS("filmtype") %>"><% objRS("filmtype") %></option> <%end if objRS.moveNext() loop %> </select>
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.