Salve a tutti, ho un form con quattor checkbox, ed un input text relative alla scelta della lingua.
Se le quattro non sono selezionate, ma viene immesso un valore nella imput text, nella fase di convalida, dovrebbe riportarmi quel valore nella input text.
Vi posto il codice, nella speranza che potreste capirmi meglio![]()
In questo modo tutto funziona, ma non so se è il metodo giusto, anche perche se io volessi aggiungere altre lingue (anche 10 o più), non penso sarebbe tanto indicato.codice:<% lng = Request("lingua") %> <input name="lingua" type="checkbox" id="lingua" value="inglese" <% if instr(lng,"inglese") <> 0 then %> checked="checked"<% end if%> /> inglese <input name="lingua" type="checkbox" id="lingua" value="francese" <% if instr(lng,"francese") <> 0 then %> checked="checked"<% end if%>/> francese <input name="lingua" type="checkbox" id="lingua" value="tedesco" <% if instr(lng,"tedesco") <> 0 then %> checked="checked"<% end if%>/> tedesco <input name="lingua" type="checkbox" id="lingua" value="spagnolo" <% if instr(lng,"spagnolo") <> 0 then %> checked="checked"<% end if%> /> spagnolo altro <input name="lingua" type="text" id="lingua" maxlength="15" <% if lng <> "" or lng <> null then arrLng = split(lng,",") altro = trim(arrLng(UBound(arrLng))) if altro <> "inglese" AND altro <> "francese" AND altro <> "tedesco" AND altro <> "spagnolo" then Response.Write("value='"&altro&"'") end if %>/>
Vi pregherei di correggere i miei sbagli, thnx

Rispondi quotando