]> git.joonet.de Git - adminer.git/commitdiff
Better select.value detection
authorJakub Vrana <jakub@vrana.cz>
Mon, 28 Feb 2011 14:57:37 +0000 (15:57 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 28 Feb 2011 14:57:37 +0000 (15:57 +0100)
adminer/static/functions.js

index 680c16bdbfd8ad581c2197c6929c71f197b2e809..dc9867111474dd65e9c5ab2bdc7502925414fc41 100644 (file)
@@ -36,7 +36,8 @@ function verifyVersion() {
 * @return string
 */
 function selectValue(select) {
-       return (select.value !== undefined ? select.value : select.options[select.selectedIndex].text);
+       var selected = select.options[select.selectedIndex];
+       return ((selected.attributes.value || {}).specified ? selected.value : selected.text);
 }
 
 /** Check all elements matching given name