From: Jakub Vrana Date: Mon, 28 Feb 2011 14:57:37 +0000 (+0100) Subject: Better select.value detection X-Git-Tag: v3.2.1~71 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=ee653a689eb6c35a21efd7b50efa00003f5f6d8e;p=adminer.git Better select.value detection --- diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 680c16bd..dc986711 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -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