mirror of
https://github.com/apache/struts.git
synced 2026-08-31 11:24:28 +00:00
Resolved WW-3182 - reimplemented removeOption()
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@932721 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -28,9 +28,12 @@ function addOption(objTextBox, objTargetElement) {
|
||||
}
|
||||
|
||||
function removeOptions(objTargetElement) {
|
||||
for(var i=0;i<objTargetElement.options.length;i++) {
|
||||
if(objTargetElement.options[i].selected) {
|
||||
objTargetElement.options[i] = null;
|
||||
var i = 0;
|
||||
while(objTargetElement.options.length > i) {
|
||||
if (objTargetElement.options[i].selected) {
|
||||
objTargetElement.options.remove(i);
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user