Finally, i've found where the problem is and got a solution.
1.Problem: low-quality javascript code
If the related questions are in the same page, LS implements array filter with javascript.
Click on the checkbox(or radio) triggers the function called
checkconditionsfunction checkconditions(value, name, type)
My question has 26 options, and there are 26X2 if-else blocks in the
checkconditions().
The code of if-else block like this:
if ((document.getElementById('java78256X82X324611') != null && document.getElementById('java78256X82X324611').value == 'Y'))
{
document.getElementById('javatbd78256X82X325011').style.display='';
document.getElementById('tbdisp78256X82X325011').value = 'on';
}
else
{
document.getElementById('javatbd78256X82X325011').style.display='none';
document.getElementById('tbdisp78256X82X325011').value = 'off';
$('#javatbd78256X82X325011 input[type=text]').val('');
$('#javatbd78256X82X325011 input[type=checkbox]').attr('checked', false); }
It means when I single click the checkbox, I have to run 52 blocks of code.
And there are 2 jQuery sentences in each else block!!!
jQuery has bad performance in IE6, as u know.
So that's the problem.
2.My solution:
I don't have enough time and I only replace the jQuery code with the normal javascript sentences.
I modified "group.php" (latest version)
Near Line 910, I declare a variable to save the id of the hidden answer(may be a checkbox, text or radio type)
//@author Jesse(jiexi.zha@gmail.com)
$answerid = "answer".$qbase.$fansrows['title'];
Near Line 940
// This line resets the text fields in the hidden row
$appendj .= "\t\t$('#$tbody input[type=text]').val('');\n";
// This line resets any radio group in the hidden row
$appendj .= "\t\t$('#$tbody input[type=checkbox]').attr('checked', false); ";
changed to
// Modified By Jesse (jiexi.zha@gmail.com)
// Abandon the jQuery Implementation. Because IE6 sucks.
$appendj .= "\t\t inputtype = document.getElementById('$answerid').type;\n";
// This line resets the text fields in the hidden row
// $appendj .= "\t\t$('#$tbody input[type=text]').val('');";
$appendj .= "\t\tif(inputtype == 'text') document.getElementById('$answerid').value = '';\n";
// This line resets any radio group in the hidden row
// $appendj .= "\t\t$('#$tbody input[type=checkbox]').attr('checked', false); ";
$appendj .= "\t\tdocument.getElementById('$answerid').checked = false;\n";
Near Line 963, 1028, 1060
// This line resets the text fields in the hidden row
$appendj .= "\t\t$('#$tbody input[type=text]').val('');";
// This line resets any radio group in the hidden row
$appendj .= "\t\t$('#$tbody input[type=radio]').attr('checked', false); ";
changed to
// Modified By Jesse (jiexi.zha@gmail.com)
// Abandon the jQuery Implementation. Because IE6 sucks.
$appendj .= "\t\t inputtype = document.getElementById('$answerid').type;\n";
// This line resets the text fields in the hidden row
// $appendj .= "\t\t$('#$tbody input[type=text]').val('');";
$appendj .= "\t\tif(inputtype == 'text') document.getElementById('$answerid').value = '';\n";
// This line resets any radio group in the hidden row
// $appendj .= "\t\t$('#$tbody input[type=radio]').attr('checked', false); ";
$appendj .= "\t\tdocument.getElementById('$answerid').checked = false;\n";
That really improve the performance in IE6.
I hope someone would rewrite the javascript function and give us a better solution.
holch and Shnoulle, thanks a lot!