Don't assume we are the first form on the page
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 7 May 2008 16:44:01 +0000 (16:44 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 7 May 2008 16:44:01 +0000 (16:44 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13105 7612ce4b-ef26-0410-bec9-ea0150e637f0

include/options/display.php
src/options.php

index 3840920f4ce0f0ef097ea6faea15cca571ea30bb..4ba394529750f49272ce0b4f09142102b9b17386 100644 (file)
@@ -197,7 +197,7 @@ function load_optpage_data_display() {
                            SMPREF_JS_ON         => _("Always"),
                            SMPREF_JS_OFF        => _("Never")),
         'save'    => 'save_option_javascript_autodetect',
-        'extra_attributes' => array('onclick' => 'document.forms[0].new_js_autodetect_results.value = \'' . SMPREF_JS_ON . '\';'),
+        'extra_attributes' => array('onclick' => 'document.option_form.new_js_autodetect_results.value = \'' . SMPREF_JS_ON . '\';'),
     );
 
     $optvals[SMOPT_GRP_GENERAL][] = array(
index facbe529f2cfebd483d3a30098e589ce4dbfc63b..c5d52e464b22469ce41618ffc46dfc6663eb6e24 100644 (file)
@@ -424,7 +424,7 @@ if ($optpage == SMOPT_PAGE_MAIN) {
     }
 
     // Begin output form
-    echo addForm('options.php', 'post', 'f')
+    echo addForm('options.php', 'post', 'option_form')
        . create_optpage_element($optpage)
        . create_optmode_element(SMOPT_MODE_SUBMIT);