"rewriting onchange for checkboxes for IE to an onclick"

This commit is contained in:
Ralf Becker 2009-07-30 07:10:31 +00:00
parent 5aa62b71b9
commit 821f0daf42

View File

@ -1078,7 +1078,16 @@ class etemplate extends boetemplate
} }
if ($cell['onchange'] && !($cell['type'] == 'button' || $cell['type'] == 'buttononly')) if ($cell['onchange'] && !($cell['type'] == 'button' || $cell['type'] == 'buttononly'))
{ {
$options .= ' onChange="'.($cell['onchange'] == '1' ? 'this.form.submit();' : $this->js_pseudo_funcs($cell['onchange'],$cname)).'"'; $onchange = $cell['onchange'] == '1' ? 'this.form.submit();' : $this->js_pseudo_funcs($cell['onchange'],$cname);
// rewriting onchange for checkboxes for IE to an onclick
if ($cell['type'] == 'checkbox' && html::$user_agent == 'msie')
{
$options .= ' onClick="'.$onchange.'; return true;"';
}
else
{
$options .= ' onChange="'.$onchange.'"';
}
} }
} }
if ($form_name != '') if ($form_name != '')