From 8b747fbdab54ab8e748d6529b22fddd6ff9c81d1 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Tue, 8 Mar 2011 17:33:44 -0500 Subject: [PATCH] Minor fix for JS error when using undefined extra_data_text element --- main/admin/user_list.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main/admin/user_list.php b/main/admin/user_list.php index d186044048..e0bd1d2164 100755 --- a/main/admin/user_list.php +++ b/main/admin/user_list.php @@ -94,14 +94,14 @@ function display_advanced_search_form () { $(document).ready(function() { var select_val = $("#input_select_extra_data").val(); - - if (select_val != 0) { - document.getElementById(\'extra_data_text\').style.display="block"; - document.getElementById(\'input_extra_text\').value = ""; - } else { - document.getElementById(\'extra_data_text\').style.display="none"; + if ( document.getElementById(\'extra_data_text\')) { + if (select_val != 0) { + document.getElementById(\'extra_data_text\').style.display="block"; + document.getElementById(\'input_extra_text\').value = ""; + } else { + document.getElementById(\'extra_data_text\').style.display="none"; + } } - }); '; @@ -996,4 +996,4 @@ if ($_GET['action'] == "login_as" && isset ($login_as_user_id)) $table->set_form_actions(array ('delete' => get_lang('DeleteFromPlatform'))); $table->display(); //} -Display :: display_footer(); \ No newline at end of file +Display :: display_footer();