]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/js/tiny_mce/utils/form_utils.js
Imported Upstream version 0.5
[roundcube.git] / program / js / tiny_mce / utils / form_utils.js
index dd45e730de2c72c5af2278f1ed117b327c5f1755..2617a26edb2b0a60f2fc986c586214a6e3fa56bb 100644 (file)
@@ -1,10 +1,11 @@
 /**\r
- * $Id: form_utils.js 996 2009-02-06 17:32:20Z spocke $\r
+ * form_utils.js\r
  *\r
- * Various form utilitiy functions.\r
+ * Copyright 2009, Moxiecode Systems AB\r
+ * Released under LGPL License.\r
  *\r
- * @author Moxiecode\r
- * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.\r
+ * License: http://tinymce.moxiecode.com/license\r
+ * Contributing: http://tinymce.moxiecode.com/contributing\r
  */\r
 \r
 var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));\r
@@ -92,7 +93,7 @@ function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
 function getSelectValue(form_obj, field_name) {\r
        var elm = form_obj.elements[field_name];\r
 \r
-       if (elm == null || elm.options == null)\r
+       if (elm == null || elm.options == null || elm.selectedIndex === -1)\r
                return "";\r
 \r
        return elm.options[elm.selectedIndex].value;\r