...

View Full Version : Preloader for HTML page?



Luigi Vercotti
08-30-2007, 05:22 AM
Hello guys....

PLEASE DO NOT tell that it is useless, stupid or crazy to use the preloader for HTML page...I know it :thumbsup:

Ok guys....
the code I've got it is working fine in IE and FF browsers....I need if you can help me with adding a code that after it is 100% of the preloader that the page jump to an index or to some another page.....and make the preloader go faster like from 3 to 5 seconds....

Thank you :) :thumbsup:


here is the code I need help from you...
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<link rel=stylesheet href=meta2.css type=text/css>
<title>proba universal loading</title>
<style>
.brd{border-width: 0px 0px 0px 0px;border-style: none;}
</style>
<script>


var colors=new Array("","#274957","#2c4d5b","#305260","#355764","#3a5b69","#3E606E","#436472","#486977","#4C6E7B","#517380","#567785","#5A7C89","#5F818E","#648593","#688A97","#6D8E9C","#7293A0","#7798A5","#7B9CA9","#BCEEF4");

nsaz=50;
iqq=1;
var borne=1;
var ns=document.layers?1:0;
var bx=document;
var nbx=document;

function zx(){
if(ns) {
qx="<center><font color=white face=verdana size=1>"+(iqq*2)+"%</font></center><table border=1 width="+(iqq*4)+" bgcolor=#6C8D9B><tr><td></td></tr></table><br><br>g";
bx.write(""+qx);
bx.close();
}
else {
temp=eval("document.all.t"+iqq);
temp.style.background=colors[iqq];
//bx.innerHTML="<table border=0 width="+(iqq*4)+" bgcolor=#6C8D9B height=8><tr><td>"+(document.all?'':' ')+"</td></tr></table>"
nbx.innerHTML="<center><font face=verdana color=white size=1 >"+(iqq*5)+"% </font></center>"
}
iqq++;
if(iqq<21) {
setTimeout("zx()",nsaz);
}
if(iqq>Math.round(borne/10.5)){
if(nsaz<1000) nsaz+=300;
else nsaz+=500;
}
else{
if(nsaz>250) nsaz=-150;
}

if(iqq==20){
if(!ns) {
//nbx.innerHTML="";
//bx.innerHTML="<center><font color=white size=1 >loaded 100%</font></center>";
}
parent.changeIt();
}
}

function make(){
if(ns)
bx=eval("document.xz_.document.xz__.document");
else bx=eval("document.getElementById('xz')");
if(ns)
nbx=eval("document.nxz_.document.nxz__.document");
else nbx=eval("document.getElementById('nxz')");
zx();
}
</script>
<style>
#xz{}
</style>
</head>

<body bgcolor="#224452" background="up.gif" scroll="no" onLoad="make();">


<table border="0" width=100% height=100%>
<tr>
<td valign=middle align=center>
<table width="200" border="0" cellpadding="2">
<tr>
<td align=left style="border-width: 1px 1px 1px 1px;border-style:solid;border-color:#80a1ae" class=brd>

<font size=2 face=verdana>
<table summary="" border="0" width=100% height=12>
<tr>
<td id=t1></td>
<td id=t2></td>
<td id=t3></td>
<td id=t4></td>
<td id=t5></td>
<td id=t6></td>
<td id=t7></td>
<td id=t8></td>
<td id=t9></td>
<td id=t10></td>
<td id=t11></td>
<td id=t12></td>
<td id=t13></td>
<td id=t14></td>
<td id=t15></td>
<td id=t16></td>
<td id=t17></td>
<td id=t18></td>
<td id=t19></td>
<td id=t20></td>
</tr>
</table>

<script>
if(document.layers) document.write("<ILAYER id=xz_ width=200 height=25><LAYER id=xz__ width=200 height=25> </layer></ilayer>");
else document.write('<div id=xz></div>');
</script>
</font>
</td>
</tr>
<tr><td>
<script>
if(document.layers) document.write("<ILAYER id=nxz_ width=200 height=25><LAYER id=nxz__ width=200 height=25> </layer></ilayer>");
else document.write('<div id=nxz></div>');
</script>
</td></tr>
</table>

</td>
</tr>
</table>
</body>
</html>

shyam
08-30-2007, 03:52 PM
this change gives approx. 5 secs

...
here is the code I need help from you...
...
<script>
...
function zx(){
if(ns) {
qx="<center><font color=white face=verdana size=1>"+(iqq*2)+"%</font></center><table border=1 width="+(iqq*4)+" bgcolor=#6C8D9B><tr><td></td></tr></table><br><br>g";
bx.write(""+qx);
bx.close();
}
else {
temp=eval("document.all.t"+iqq);
temp.style.background=colors[iqq];
//bx.innerHTML="<table border=0 width="+(iqq*4)+" bgcolor=#6C8D9B height=8><tr><td>"+(document.all?'':' ')+"</td></tr></table>"
nbx.innerHTML="<center><font face=verdana color=white size=1 >"+(iqq*5)+"% </font></center>"
}
iqq++;
if(iqq<21) {
setTimeout("zx()",nsaz);
nsaz += (nsaz < 250) ? 50 : -50;
}

/*
if(iqq>Math.round(borne/10.5)){
if(nsaz<1000) nsaz+=300;
else nsaz+=500;
}
else{
if(nsaz>250) nsaz=-150;
}
*/
...
</script>
..

Luigi Vercotti
08-31-2007, 05:04 AM
ok and thank you...

I finished the code yesterday...so it will open a new page after the preloader is done


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<link rel=stylesheet href=meta2.css type=text/css>
<title>proba universal loading</title>
<style>
.brd{border-width: 0px 0px 0px 0px;border-style: none;}
</style>
<script>


var colors=new Array("","#274957","#2c4d5b","#305260","#355764","#3a5b69","#3E606E","#436472","#486977","#4C6E7B","#517380","#567785","#5A7C89","#5F818E","#648593","#688A97","#6D8E9C","#7293A0","#7798A5","#7B9CA9","#BCEEF4");

nsaz=50;
iqq=1;
var borne=1;
var ns=document.layers?1:0;
var bx=document;
var nbx=document;

function zx(){
if(ns) {
qx="<center><font color=white face=verdana size=1>"+(iqq*2)+"%</font></center><table border=1 width="+(iqq*4)+" bgcolor=#6C8D9B><tr><td></td></tr></table><br><br>g";
bx.write(""+qx);
bx.close();
}
else {
temp=eval("document.all.t"+iqq);
temp.style.background=colors[iqq];
nbx.innerHTML="<center><font face=verdana color=white size=1 >"+(iqq*5)+"% </font></center>"
}
iqq++;
/*if (iqq=100){
//<a href="http://dynamicdrive.com/"</a>;
}*/
if(iqq<21) {
setTimeout("zx()",nsaz);
nsaz += (nsaz < 250) ? 50 : -50;
}

var locationAfterPreload = "http://suziklinik.cz"
if(iqq==20){
if(!ns) {
/*
==============================================
//TADY DOLE SI ZMEN LINKU !!!!!!!!!!!!!!!!!!!
Here you can change the link
==============================================
*/
window.open("http://suziklinik.cz")
}
parent.changeIt();
}
}

function make(){
if(ns)
bx=eval("document.xz_.document.xz__.document");
else bx=eval("document.getElementById('xz')");
if(ns)
nbx=eval("document.nxz_.document.nxz__.document");
else nbx=eval("document.getElementById('nxz')");
zx();
}
</script>
<style>
#xz{}
</style>
</head>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum