need help

Discussion in 'JavaScript' started by bikerboys, Jan 19, 2008.

  1. #1
    im useing this script it loadsin fire fox buy not in internet exploxer 6 can anyone help please

    <!-- CONTENT BEGINS HERE -->
    <SCRIPT language=JavaScript>
    var imagenames=new Array('tru/gfx/-.gif', 'tru/gfx/Copy of mb.gif', 'tru/gfx/b0.gif', 'tru/gfx/b1.gif', 'tru/gfx/b2.gif', 'tru/gfx/b3.gif', 'tru/gfx/b4.gif', 'tru/gfx/b5.gif', 'tru/gfx/b6.gif', 'tru/gfx/bg.gif', 'tru/gfx/brl.gif', 'tru/gfx/brr.gif', 'tru/gfx/c0.gif', 'tru/gfx/c1.gif', 'tru/gfx/c2.gif', 'tru/gfx/c3.gif', 'tru/gfx/c4.gif', 'tru/gfx/c5.gif', 'tru/gfx/don.jpg', 'tru/gfx/donsh.jpg', 'tru/gfx/goldtable.jpg', 'tru/gfx/kdr.gif', 'tru/gfx/l.gif', 'tru/gfx/mb.gif', 'tru/gfx/od.gif', 'tru/gfx/pixel.gif', 'tru/gfx/r.gif', 'tru/gfx/rd.gif', 'tru/gfx/t.gif', 'tru/gfx/tb.gif', 'tru/gfx/tl.gif', 'tru/gfx/tr.gif');

    var yposition=250; // POSITION OF LOAD BAR FROM TOP OF WINDOW, IN PIXELS
    var barheight=28; // HEIGHT OF PROGRESS BAR IN PIXELS (MIN 25)
    var barwidth=350; // WIDTH OF THE BAR IN PIXELS
    var bordercolor='#666666'; // COLOR OF THE BORDER
    var newlocation='play.php';
    // THE NEW LOCATION REPORTED TO THIS FILE'S LOCATION
    //DO NOT EDIT BEYOND THIS POINT UNLESS YOU REALLY KNOW JAVASCRIPT
    var NS4 = (navigator.appName.indexOf("Netscape")>=0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) < 5)? true : false;
    var IE4 = (document.all)? true : false;
    var NS6 = (parseFloat(navigator.appVersion) >= 5 && navigator.appName.indexOf("Netscape")>=0 )? true: false;
    var imagesdone=false;
    var blocksize=barwidth/(imagenames.length);
    barheight=Math.max(barheight,25);
    var loaded=0, perouter, perdone, images=new Array();
    var txt=(NS4)?'<layer name="perouter" bgcolor="'+bordercolor+'" visibility="hide">' : '<div id="perouter" style="position:absolute; visibility:hidden; background-color:'+bordercolor+'">';
    txt+='<table cellpadding="0" cellspacing="1" border="0"><tr><td width="'+barwidth+'" height="'+barheight+'" valign="center">';
    if(NS4)txt+='<ilayer width="100%" height="100%"><layer width="100%" height="100%" background="images/main/pl_back.gif" top="0" left="0">';
    txt+='<table cellpadding="0" cellspacing="0" border="0"><tr><td valign="center" width="'+barwidth+'" height="'+barheight+'" background="images/main/pl_back.gif"><center><span style="font-family: sans-serif; color: gray; font-weight: bold; font-size: 10px;">Loading The Mafia Boss ...</span></center></td></tr></table>';
    if(NS4) txt+='</layer>';
    txt+=(NS4)? '<layer name="perdone" width="100%" height="'+barheight+'" background="images/main/pl_front.gif" top="0" left="0">' : '<div id="perdone" style="position:absolute; top:1px; left:1px; width:'+barwidth+'px; height:'+barheight+'px; background="images/main/pl_front.gif"; z-index:100">';
    txt+='<table cellpadding="0" cellspacing="0" border="0"><tr><td valign="center" width="'+barwidth+'" height="'+barheight+'" background="images/main/pl_front.gif""><center><span style="font-family: sans-serif; color: white; font-weight: bold; font-size: 10px;">Loading The Mafia Boss ...</span></center></td></tr></table>';
    txt+=(NS4)? '</layer></ilayer>' : '</div>';
    txt+='</td></tr></table>';
    txt+=(NS4)?'</layer>' : '</div>';
    document.write(txt);
    function loadimages(){
    if(NS4){
    perouter=document.perouter;
    perdone=document.perouter.document.layers[0].document.perdone;
    }
    if(NS6){
    perouter=document.getElementById('perouter');
    perdone=document.getElementById('perdone');
    }
    if(IE4){
    perouter=document.all.perouter;
    perdone=document.all.perdone;
    }
    cliplayer(perdone,0,0,barheight,0);
    window.onresize=setouterpos;
    setouterpos();
    for(n=0;n<imagenames.length;n++){
    images[n]=new Image();
    images[n].src=imagenames[n];
    setTimeout('checkload('+n+')' ,n*100);
    }}
    function setouterpos(){
    var ww=(IE4)? document.body.clientWidth : window.innerWidth;
    var x=(ww-barwidth)/2;
    if(NS4){
    perouter.moveTo(x,yposition);
    perouter.visibility="show";
    }
    if(IE4||NS6){
    perouter.style.left=x+'px';
    perouter.style.top=yposition+'px';
    perouter.style.visibility="visible";
    }}
    function dispbars(){
    loaded++;
    cliplayer(perdone, 0, blocksize*loaded, barheight, 0);
    if(loaded>=imagenames.length)setTimeout('hideperou ter()', 800);
    }
    function checkload(index){
    if (images[index].complete)
    {
    dispbars();
    }
    else
    {
    setTimeout('checkload('+index+')', 100);
    }
    }
    function hideperouter(){
    (NS4)? perouter.visibility="hide" : perouter.style.visibility="hidden";
    imagesdone=true;
    window.location='play.php';
    }
    function cliplayer(layer, ct, cr, cb, cl){
    if(NS4){
    layer.clip.left=cl;
    layer.clip.top=ct;
    layer.clip.right=cr;
    layer.clip.bottom=cb;
    }
    if(IE4||NS6)layer.style.clip='rect('+ct+' '+cr+' '+cb+' '+cl+')';
    }
    window.onload=loadimages;
    </SCRIPT>
     
    bikerboys, Jan 19, 2008 IP
  2. Xavier_3D

    Xavier_3D Well-Known Member

    Messages:
    1,299
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    140
    #2
    What is this Script Intended For? Please Post the relavent error you get in IE with regard to this..
     
    Xavier_3D, Jan 19, 2008 IP
  3. bikerboys

    bikerboys Well-Known Member

    Messages:
    308
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #3
    its a image preloader it just stops and dont go to the next page like it should i dont get a error just stops
     
    bikerboys, Jan 19, 2008 IP
  4. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You might want to look for an alternative script. That one is coded badly and outdated.
     
    MMJ, Jan 19, 2008 IP
  5. bikerboys

    bikerboys Well-Known Member

    Messages:
    308
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #5
    wellif anyone as any ideas would be great
     
    bikerboys, Jan 21, 2008 IP
  6. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I'm sure Google has some suggestions. ;)
     
    MMJ, Jan 21, 2008 IP