From 5826affb7b923cce53fc68643167eec5f0f3931e Mon Sep 17 00:00:00 2001 From: pdontthink Date: Wed, 27 Aug 2003 05:56:46 +0000 Subject: [PATCH] Fix javascript errors in some browsers by moving autodetect script into onLoad handler git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5576 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- include/options/display.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/options/display.php b/include/options/display.php index 1493f931..1e21532b 100644 --- a/include/options/display.php +++ b/include/options/display.php @@ -99,17 +99,14 @@ function load_optpage_data_display() { SMPREF_JS_OFF => _("Never")) ); - $js_autodetect_script = - "\n"; + $onLoadScript = "document.forms[0].new_js_autodetect_results.value = '" . SMPREF_JS_ON . "'"; $js_autodetect_results = SMPREF_JS_OFF; $optvals[SMOPT_GRP_GENERAL][] = array( 'name' => 'js_autodetect_results', 'caption' => '', 'type' => SMOPT_TYPE_HIDDEN, 'refresh' => SMOPT_REFRESH_NONE, - 'post_script' => $js_autodetect_script, + //'post_script' => $js_autodetect_script, 'save' => 'save_option_javascript_autodetect' ); @@ -315,7 +312,8 @@ function load_optpage_data_display() { /* Assemble all this together and return it as our result. */ $result = array( 'grps' => $optgrps, - 'vals' => $optvals + 'vals' => $optvals, + 'xtra' => $onLoadScript ); return ($result); } -- 2.25.1