StevePMedlem sedan mars 2003772 inlägg Response.Write("<option Value=""" & trim(ObjRs("Description")))
If Trim(VarDepartment) = Trim(ObjRs("Description")) then
Response.Write (" Selected")
end if
Response.write (""">")
Response.Write(ObjRs("Description") & "</option>") & VbCrlf
Detta generar följande
<select class="selectflex1" name="frmDepartment">
<option Value="Finance">Finance</option>
<option Value="General Insurance Selected">General Insurance</option>
<option Value="Human Resources">Human Resources</option>
<option Value="Investment">Investment</option>
</select>
Som ni ser så hamnar "Selected" innanför fnuttarna.
[kod]<option Value="General Insurance Selected">
Men jag måste ha dubbelfnuttar runt strängarna annars bryter den av efter ett mellanslag.
Hur ska ja göra så det blir
<option Value="General Insurance" Selected>General Insurance</option>
StevePMedlem sedan mars 2003772 inlägg Var ju iofs inte så klurigt..
Response.Write("<option Value=""" & trim(ObjRs("Description")))
If Trim(VarDepartment) = Trim(ObjRs("Description")) then
Response.Write (""" Selected")
end if
Response.write (">")
Response.Write(ObjRs("Description") & "</option>") & VbCrlf
StevePMedlem sedan mars 2003772 inlägg Detta blev ju iofs ändå fel :(
Nu blev det
<option Value="Administration>Administration</option>
<option Value="Finance>Finance</option>
<option Value="General Insurance" Selected>General Insurance</option>
<option Value="Human Resources>Human Resources</option>
<option Value="Investment>Investment</option>
Alltså ingen avslutande fnutt på dom andra.
LarsGMedlem sedan dec. 200012 464 inlägg Response.Write "<option Value=""" & trim(ObjRs("Description")) & """"
If Trim(VarDepartment) = Trim(ObjRs("Description")) then
Response.Write " Selected"
end if
Response.write ">"
Response.Write ObjRs("Description") & "</option>" & VbCrlf