fixed function of advanced button in formslib - you had to click it twice initially

This commit is contained in:
skodak
2007-01-12 10:48:11 +00:00
parent db061ab2dc
commit 74d15d359d

View File

@ -251,7 +251,7 @@ function elementShowAdvanced(elements, show) {
function showAdvancedOnClick(button, hidetext, showtext){
var toSet=findChildNodes(button.form, null, 'advanced');
var buttontext = '';
if (button.form.elements['mform_showadvanced_last'].value == '0') {
if (button.form.elements['mform_showadvanced_last'].value == '0' || button.form.elements['mform_showadvanced_last'].value == '' ) {
elementShowAdvanced(toSet, true);
buttontext = hidetext;
button.form.elements['mform_showadvanced_last'].value = '1';