From: Moritz Bunkus Date: Fri, 26 Oct 2007 07:23:30 +0000 (+0000) Subject: Den DOCTYPE nur dann setzen, wenn der Internet Explorer verwendet wird. Andere Browse... X-Git-Tag: release-2.6.0beta1~459 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=777e883798f57271d29f089bb5520bd4d56ad373;p=kivitendo-erp.git Den DOCTYPE nur dann setzen, wenn der Internet Explorer verwendet wird. Andere Browser haben ansonsten Probleme, u.a. mit dem JavaScript-MenĂ¼. --- diff --git a/SL/Form.pm b/SL/Form.pm index e4c4dd5b7..d3bd19c64 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -380,6 +380,15 @@ sub header { my ($stylesheet, $favicon); if ($ENV{HTTP_USER_AGENT}) { + my $doctype; + + if ($ENV{'HTTP_USER_AGENT'} =~ m/MSIE\s+\d/) { + $main::lxdebug->message(0, "yeah"); + # Only set the DOCTYPE for Internet Explorer. Other browsers have problems displaying the menu otherwise. + $doctype = qq|\n|; + } else { + $main::lxdebug->message(0, "nope"); + } my $stylesheets = "$self->{stylesheet} $self->{stylesheets}"; @@ -433,8 +442,7 @@ sub header { } print qq|Content-Type: text/html; charset=${db_charset}; - - +${doctype} $self->{titlebar} $stylesheet