Revision 777e8837
Von Moritz Bunkus vor etwa 17 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
380 | 380 |
my ($stylesheet, $favicon); |
381 | 381 |
|
382 | 382 |
if ($ENV{HTTP_USER_AGENT}) { |
383 |
my $doctype; |
|
384 |
|
|
385 |
if ($ENV{'HTTP_USER_AGENT'} =~ m/MSIE\s+\d/) { |
|
386 |
$main::lxdebug->message(0, "yeah"); |
|
387 |
# Only set the DOCTYPE for Internet Explorer. Other browsers have problems displaying the menu otherwise. |
|
388 |
$doctype = qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n|; |
|
389 |
} else { |
|
390 |
$main::lxdebug->message(0, "nope"); |
|
391 |
} |
|
383 | 392 |
|
384 | 393 |
my $stylesheets = "$self->{stylesheet} $self->{stylesheets}"; |
385 | 394 |
|
... | ... | |
433 | 442 |
} |
434 | 443 |
print qq|Content-Type: text/html; charset=${db_charset}; |
435 | 444 |
|
436 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
437 |
<html> |
|
445 |
${doctype}<html> |
|
438 | 446 |
<head> |
439 | 447 |
<title>$self->{titlebar}</title> |
440 | 448 |
$stylesheet |
Auch abrufbar als: Unified diff
Den DOCTYPE nur dann setzen, wenn der Internet Explorer verwendet wird. Andere Browser haben ansonsten Probleme, u.a. mit dem JavaScript-Menü.