PHP IF stops IE content from loading

Posted by Rsmithy on Stack Overflow See other posts from Stack Overflow or by Rsmithy
Published on 2012-09-18T14:42:32Z Indexed on 2012/09/18 15:38 UTC
Read the original article Hit count: 236

Filed under:

scenario I have a PHP if statement to test if a user is logging in for the first time ever. This then displays, a demo in a greybox popup box.

Sadly when the box loads in IE, the content of the website doesn't. This means when I user closes the box, they are left the with background.

Code - I'm now using PHP include.

greybox.php

<?php if ($fli == 0) {echo " <script type='text/javascript'>
window.onload = function() {
 GB_showCenter('Your first login', '../video.php');
};
</script> ";} else echo "";?>



<!-- GB scrip --> 
    <script type="text/javascript">
        var GB_ROOT_DIR = "greybox/";
    </script>

<script type="text/javascript" src="greybox/AJS.js"></script>
<script type="text/javascript" src="greybox/AJS_fx.js"></script>
<script type="text/javascript" src="greybox/gb_scripts.js"></script>
<link href="greybox/gb_styles.css" rel="stylesheet" type="text/css" />

<!-- GB -->

RELEVANT Script on main site

<?php  $fli = $_SESSION["USER"]["fli"]; ?>
<?php include "greybox.php" ?>

Comparison of IE / Chrome

I would deeply appreicate any help at all please! :)

© Stack Overflow or respective owner

Related posts about php