Reply
Javascript help please!!!
Old 01-19-2008, 04:41 AM Javascript help please!!!
Super Talker

Posts: 112
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 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Reply     « Reply to Javascript help please!!!
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12287 seconds with 12 queries