if statement not working in IE8
Posted: Sat Jan 23, 2010 1:35 am
Only in IE8, the presence of the following if statement results in no image being displayed, even though the page source is identical in FF, Chrome and IE8. <?php if (!$page) { ?>href="<?php print $node_url?>"><?php }. The if statement simply prevents the href statement from being added if we are in node view. If I remove the if statement, the image appears as expected.
Here is the complete php code folowed by idendical page source from FF and IE8:
<a <?php if (!$page) { ?>href="<?php print $node_url?>"><?php } print theme('imagecache', $field_inline_1_image_width[0]['value'], $field_inline_1_image[0]['filepath'], $node->title, '', array('style' => 'border:'.$field_inline_1_image_border[0]['value'].'px solid #bbb')); ?></a>
FF page source:
<a <img src="http://www.newsite.fillmoregazette.com/ ... 0-1648.jpg" alt="test from editor joe" title="" style="border:1px solid #bbb" width="640" height="480" /></a>
IE8 page source:
<a <img src="http://www.newsite.fillmoregazette.com/ ... 0-1648.jpg" alt="test from editor joe" title="" style="border:1px solid #bbb" width="640" height="480" /></a>
Anyone have a clue as to why the presence of the if statment causes the image to not be displayed in IE8?
Thank you,
Scott
Here is the complete php code folowed by idendical page source from FF and IE8:
<a <?php if (!$page) { ?>href="<?php print $node_url?>"><?php } print theme('imagecache', $field_inline_1_image_width[0]['value'], $field_inline_1_image[0]['filepath'], $node->title, '', array('style' => 'border:'.$field_inline_1_image_border[0]['value'].'px solid #bbb')); ?></a>
FF page source:
<a <img src="http://www.newsite.fillmoregazette.com/ ... 0-1648.jpg" alt="test from editor joe" title="" style="border:1px solid #bbb" width="640" height="480" /></a>
IE8 page source:
<a <img src="http://www.newsite.fillmoregazette.com/ ... 0-1648.jpg" alt="test from editor joe" title="" style="border:1px solid #bbb" width="640" height="480" /></a>
Anyone have a clue as to why the presence of the if statment causes the image to not be displayed in IE8?
Thank you,
Scott