From: pdontthink Date: Wed, 7 May 2008 16:44:01 +0000 (+0000) Subject: Don't assume we are the first form on the page X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c4e3cf06abfe729001221894d9dd8b1cc78532aa;p=squirrelmail.git Don't assume we are the first form on the page git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13105 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/include/options/display.php b/include/options/display.php index 3840920f..4ba39452 100644 --- a/include/options/display.php +++ b/include/options/display.php @@ -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( diff --git a/src/options.php b/src/options.php index facbe529..c5d52e46 100644 --- a/src/options.php +++ b/src/options.php @@ -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);