]> wagnertech.de Git - kivitendo-erp.git/commitdiff
doctype setzen. neuere browser kommen gut mit dem javascript klar, solange transition...
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 17 Oct 2011 10:17:31 +0000 (12:17 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Mon, 17 Oct 2011 10:17:31 +0000 (12:17 +0200)
SL/Form.pm
bin/mozilla/menu.pl

index 0268aaf2e2a82eb659425192f17f69904c787449..f50cba70d381e183166c9cdeb2c9cf928cec8143 100644 (file)
@@ -722,10 +722,15 @@ sub header {
     </script>|;
   }
 
+  my  %doctypes = (
+    strict       => qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">|,
+    transitional => qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">|,
+    frameset     => qq|<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">|,
+  );
+
   # output
   print $self->create_http_response(content_type => 'text/html', charset => $db_charset);
-  print "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>\n"
-    if  $ENV{'HTTP_USER_AGENT'} =~ m/MSIE\s+\d/; # Other browsers may choke on menu scripts with DOCTYPE.
+  print $doctypes{$params{doctype} || 'transitional'}, $/;
   print <<EOT;
 <html>
  <head>
index 15c43efe53867ea290d704e12ef6e469d42f1c31..791095739f713eb8645156ad54d05021dd5069f2 100644 (file)
@@ -59,7 +59,7 @@ sub display {
   $callback     = "login.pl?action=company_logo"      if $callback =~ /^(\.\/)?$/;
   my $framesize = _calc_framesize();
 
-  $::form->header;
+  $::form->header(doctype => 'frameset');
 
   print qq|
 <frameset rows="28px,*" cols="*" framespacing="0" frameborder="0">