lulu50
asked on
Reselect my selected multi select list
Hi,
I have a multi select list that I insert into my table.
What I want is to reselect the list if I'm passing the ID for editing.
I have a multi select list that I insert into my table.
What I want is to reselect the list if I'm passing the ID for editing.
<SELECT multiple="multiple" name="SelectDepartmentImpacted" id="SelectDepartmentImpacted" style="width:500px;height:130px;" class="SearchBySelect5">
<cfoutput query="QDepartmentImpacted">
<CFIF isDefined("QSelectedDepartmentJoint") and #QSelectedDepartmentJoint.RecordCount# gt 0>
<cfif #QDepartmentImpacted.DepartmentImpactedID# eq #QSelectedDepartmentJoint.DepartmentImpactedID# >
<option value="#QDepartmentImpacted.DepartmentImpactedID#" selected="selected">#QDepartmentImpacted.Department#</option>
<cfelse>
<option value="#QDepartmentImpacted.DepartmentImpactedID#">#QDepartmentImpacted.Department#</option>
</cfif>
<cfelse>
<option value="#QDepartmentImpacted.DepartmentImpactedID#">#QDepartmentImpacted.Department#</option>
</CFIF>
</cfoutput>
</select>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellentooooooo !!!!!!!!!!!!
Thank you Thank you and just one more Thank you lol lol
Thank you Thank you and just one more Thank you lol lol
Open in new window
@gdmeria code is also right