phpwcms problem in IE
-
- Posts: 35
- Joined: Wed 17. Mar 2004, 17:26
- Contact:
phpwcms problem in IE
I have finally finished my phpwcms page for my company. One of my coworkers just discovered a problem with printing in IE. If you go to:
http://www.perfectorder.com/index.php?about_directions
using IE v6.0 on WinXP and try to print the page, IE crashes. This does NOT happen if you click the "printer friendly" link at the bottom of the page and print from there, but rather, if you just try to print the page as it is initially displayed, IE crashes. (This may happen in other IE versions as well, but this is the environement we have gotten this to consistently happen with). I also got the same problem to occur on this page:
http://www.perfectorder.com/index.php?software_naxml
However, I discovered some of the other pages on our site print fine in both the "normal" view and the "printer friendly" view. The only common element I could find in these two "problem" pages that are causing the problem is that they both make use of the "text w/ image" content part.
It seems to me that is likely not really a phpwcms bug, but an IE bug. But, since most of our users are likely to be using a similar environment, it something that concerns me a bit. It would be nice to find out 1) why does it cause IE to crash and 2) if there is a workaround. After all, the directions page is likely one of the pages our customers are most likley to print.
http://www.perfectorder.com/index.php?about_directions
using IE v6.0 on WinXP and try to print the page, IE crashes. This does NOT happen if you click the "printer friendly" link at the bottom of the page and print from there, but rather, if you just try to print the page as it is initially displayed, IE crashes. (This may happen in other IE versions as well, but this is the environement we have gotten this to consistently happen with). I also got the same problem to occur on this page:
http://www.perfectorder.com/index.php?software_naxml
However, I discovered some of the other pages on our site print fine in both the "normal" view and the "printer friendly" view. The only common element I could find in these two "problem" pages that are causing the problem is that they both make use of the "text w/ image" content part.
It seems to me that is likely not really a phpwcms bug, but an IE bug. But, since most of our users are likely to be using a similar environment, it something that concerns me a bit. It would be nice to find out 1) why does it cause IE to crash and 2) if there is a workaround. After all, the directions page is likely one of the pages our customers are most likley to print.
"wider.css" is the problem.
This block:
This section, in particular:
This block:
Code: Select all
#mainBlock {
Z-INDEX: 10; LEFT: 220px; WIDTH: 710px; POSITION: absolute; TOP: 160px; BACKGROUND-COLOR: transparent
}
Code: Select all
POSITION: absolute;
-
- Posts: 35
- Joined: Wed 17. Mar 2004, 17:26
- Contact:
I honestly don't know. I don't ~believe~ that the use of absolute positioning is the culprit , in itself. It must be how it "relates" to the content underneath and/or the ordering of that content. I haven't looked into it deeper.jaredhales wrote:ok, so why does this only cause printing problems in some pages? i believe i am using wider.css for the majority of the site. what's a safe alternative to using absolute positioning?
-
- Posts: 35
- Joined: Wed 17. Mar 2004, 17:26
- Contact:
ok, so if i setup an alternative stylesheet for the pages, like so:
<link rel="stylesheet" type="text/css" media="print" href="phpwcms_template/inc_css/print_layout.css" />
then whenever someone prints, it should try to make use of my printer friendly stylesheet. does that sound like it will be a good fix for the issue?
<link rel="stylesheet" type="text/css" media="print" href="phpwcms_template/inc_css/print_layout.css" />
then whenever someone prints, it should try to make use of my printer friendly stylesheet. does that sound like it will be a good fix for the issue?
Not sure. It seems like it ~should~ since your "printer-friendly" links use the same scheme.
http://www.codestyle.org/css/media/prin ... mary.shtml
http://www.codestyle.org/css/media/prin ... mary.shtml
-
- Posts: 35
- Joined: Wed 17. Mar 2004, 17:26
- Contact:
Dexxus, thanks for your quick replies. It seems that if I could do something of this sort:
It will work fine. But, as phpwcms works now, it puts this at the very end of the html <head>:
Which uses wider.css for everything in IE. So, it seems I am stuck.
Maybe this should be a feature request for phpwcms. To specify that the chosen stylesheet is used for the screen shots, and that the "print_layout.css" will be used for printing. Because, as much as I would like them to, not all users are going to click on the printer friendly link to print web pages.
Code: Select all
<link rel="stylesheet" type="text/css" media="screen" href="phpwcms_template/inc_css/wider.css">
<link rel="stylesheet" type="text/css" media="print" href="phpwcms_template/inc_css/print_layout.css">
Code: Select all
<link rel="stylesheet" type="text/css" href="phpwcms_template/inc_css/wider.css">
Maybe this should be a feature request for phpwcms. To specify that the chosen stylesheet is used for the screen shots, and that the "print_layout.css" will be used for printing. Because, as much as I would like them to, not all users are going to click on the printer friendly link to print web pages.
If what you say is true, I suppose you could do an "ugly" hack in "index.php" where style is applied:
FROM
TO
FROM
Code: Select all
<?php echo $block["htmlhead"] ?>
<script src="<?php echo ".".$phpwcms["templates"] ?>inc_js/frontend.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<?php echo ".".$phpwcms["templates"]."inc_css/".$block["css"] ?>">
</head>
Code: Select all
<?php echo $block["htmlhead"] ?>
<script src="<?php echo ".".$phpwcms["templates"] ?>inc_js/frontend.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<?php echo ".".$phpwcms["templates"]."inc_css/".$block["css"] ?>">
<link rel="stylesheet" type="text/css" media="print" href="phpwcms_template/inc_css/print_layout.css">
</head>
-
- Posts: 35
- Joined: Wed 17. Mar 2004, 17:26
- Contact: