diff options
author | Andrew Dolgov <[email protected]> | 2010-11-09 14:57:06 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-09 14:57:06 +0300 |
commit | 11eb3f4e544804b1f7d7155de99510c77ee4c5d2 (patch) | |
tree | 5b12f45c6e62eee8116a6bee2c42ec40d11d5569 /functions.js | |
parent | c3fc5e470e24cd44b8eae50b4af70c9c7fab0e93 (diff) |
dropbox_replace_options: only copy value when present
Diffstat (limited to 'functions.js')
-rw-r--r-- | functions.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/functions.js b/functions.js index 09582feaf..4942b50cd 100644 --- a/functions.js +++ b/functions.js @@ -2285,6 +2285,9 @@ function dropbox_replace_options(elem, options) { for (var i = 0; i < options.length; i++) { var text = options[i].firstChild.nodeValue; var value = options[i].getAttribute("value"); + + if (value == undefined) value = text; + var issel = options[i].getAttribute("selected") == "1"; var option = new Option(text, value, issel); |