Script not showing in IE
Posted: Sun May 14, 2006 1:14 pm
I have a site that looks fine in firefox, but in IE the script part doesn't show.. (its a image randomizer)
what's wrong??
Here's the site : http://www.musicspot.cl
here's the php code of the randomizer (it's inside of an IFRAME)
<body leftmargin="0" topmargin="0">
what's wrong??
Here's the site : http://www.musicspot.cl
here's the php code of the randomizer (it's inside of an IFRAME)
<body leftmargin="0" topmargin="0">
Code: Select all
<?php
$width = '299';
$height = '245';
$Ad[0] = '<a href="link1" id="link1" target=_blank><img src="imgs_locales/1.jpg" width=$width height=245 alt="link 1" border="0" id="link_1" /></a>';
$Ad[1] = '<a href="link2" id="link2" target=_blank><img src="imgs_locales/2.jpg" width=$width height=245 alt="link 2" border="0" id="link_2" /></a>';
$Ad[2] = '<a href="link3" id="link3" target=_blank><img src="imgs_locales/3.jpg" width=$width height=245 alt="link 3" border="0" id="link_3" /></a>';
$Ad[3] = '<a href="link4" id="link4" target=_blank><img src="imgs_locales/4.jpg" width=$width height=245 alt="link 4" border="0" id="link_4" /></a>';
$Ad[4] = '<a href="link5" id="link5" target=_blank><img src="imgs_locales/5.jpg" width=$width height=245 alt="link 5" border="0" id="link_5" /></a>';
$Weight[0]=1;
$Weight[1]=1;
$Weight[2]=1;
$Weight[3]=1;
$Weight[4]=1;
$Weight[5]=1;
$sum =0;
for($i=0;$i<count($Weight);$i++)
$sum+=$Weight[$i];
$ShowAd = rand(0, $sum - 1);
for($i=0;$i<count($Weight);$i++)
{
if($ShowAd<=$Weight[$i])
{
$ShowAd=$i;
break;
}
else
$ShowAd-=$Weight[$i];
}
echo $Ad[$ShowAd];
?>