I have two combo boxes with the names of all available countries and others are empty:
< Strong> Country
& lt; Select name = "country id []" multi = "multiple" id = "countryId" size = "10" & gt; & Lt; Option id = "" value = "1" & gt; Afghanistan & lt; / Options & gt; & Lt; Option id = "" value = "3" & gt; Albania & lt; / Options & gt; & Lt; Option id = "" value = "4" & gt; Algeria & lt; / Options & gt; & Lt; Option id = "" value = "5" & gt; American Samoa & lt; / Option & gt; & Lt; / Select & gt; Blank & lt; Select name = "mycountryId []" multiple = "multiple" id = "mycountryId" size = "10" & gt; & Lt; / Select & gt; Now if I select any country from the country list then it should go to the empty list, but selected attribute and the exact value Some things should be selected from the list of countries, three countries should be selected: Country & lt; Select name = "country id []" multi = "multiple" id = "country id" size = "10" & gt; & Lt; Option id = "" value = "1" & gt; Afghanistan & lt; / Options & gt; & Lt; / Select & gt; Blank & lt; Select name = "mycountryId []" multiple = "multiple" id = "mycountryId" size = "10" & gt; & Lt; Option selected = "selected" id = "" value = "3" & gt; Albania & lt; / Option & gt; & Lt; Option selected = "selected" id = "" value = "4" & gt; Algeria & lt; / Option & gt; & Lt; Option selected = "selected" id = "" value = "5" & gt; American Samoa & lt; / Option & gt; & Lt; / Select & gt; Similarly, if I click on any country in my new country list (by name empty ), then the selected country will be sent to Country < / Strong> Afghanistan Algeria I follow it very good piece of code but how with selected attribute and vise versa?
Comments
Post a Comment