From 16f6161cb4ae2b99573f3f156715410697d76b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Fri, 22 Mar 2002 14:45:39 +0000 Subject: [PATCH] Fixed the js bugs with the MSIE autocomplete feature --- ChangeLog | 2 ++ user_details.php3 | 33 +++++++++++++++++++++------------ user_password.php3 | 12 +++++++++--- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42245f9aa..aad6f765c 100755 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,8 @@ $Source$ * header.inc.php3, lines 138-143; tbl_change.php3; libraries/tbl_change.js: improved js controls for null/not null fields and fixed js bugs with the MSIE autocomplete feature. + * user_details.php3; user_password.php3: fixed the js bugs with the MSIE + autocomplete feature. 2002-03-20 Marc Delisle * lang/*, removed $strSequence diff --git a/user_details.php3 b/user_details.php3 index 815389fed..8c983a845 100644 --- a/user_details.php3 +++ b/user_details.php3 @@ -383,7 +383,7 @@ function PMA_normalOperations()  :  - + ="this.form.anyhost[1].checked = true" /> @@ -397,12 +397,12 @@ function PMA_normalOperations()  :  - + ="this.form.anyuser[1].checked = true" /> - +   @@ -411,10 +411,10 @@ function PMA_normalOperations()  :  - + ="nopass[1].checked = true" />     :  - + ="nopass[1].checked = true" /> @@ -606,7 +606,7 @@ function PMA_grantOperations($grants)   - + ="change(this)" /> @@ -688,7 +688,7 @@ function PMA_editOperations($host, $user)  :  - " onchange="this.form.anyhost[1].checked = true" /> + " ="this.form.anyhost[1].checked = true" /> @@ -702,12 +702,12 @@ function PMA_editOperations($host, $user)  :  - " onchange="this.form.anyuser[1].checked = true" /> + " ="this.form.anyuser[1].checked = true" /> - +   @@ -717,7 +717,7 @@ function PMA_editOperations($host, $user) - +   @@ -726,10 +726,10 @@ function PMA_editOperations($host, $user)  :  - + ="nopass[2].checked = true" />     :  - + ="nopass[2].checked = true" /> @@ -989,6 +989,15 @@ $result = @mysql_query('SELECT COUNT(Password) FROM mysql.user'); $password_field = (mysql_result($result, 0) ? 'Password' : 'password'); +/** + * Autocomplete feature of IE kills the "onchange" event handler and it must be + * replaced by the "onpropertychange" one in this case + */ +$chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) + ? 'onpropertychange' + : 'onchange'; + + /** * Displays headers */ diff --git a/user_password.php3 b/user_password.php3 index 2a542404a..6335f923c 100644 --- a/user_password.php3 +++ b/user_password.php3 @@ -91,13 +91,19 @@ if (!empty($error_msg)) { echo '

' . $strError . ' : ' . $error_msg . '

' . "\n"; } +// loic1: autocomplete feature of IE kills the "onchange" event handler and it +// must be replaced by the "onpropertychange" one in this case +$chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) + ? 'onpropertychange' + : 'onchange'; + // Displays the form ?>
@@ -107,10 +113,10 @@ if (!empty($error_msg)) {  : 
- +
- + ="nopass[1].checked = true" />     :  - + ="nopass[1].checked = true" />