Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2005
    Posts
    33
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Question Preloader for HTML page?

    Hello guys....

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

    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


    here is the code I need help from you...
    Code:
    <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>

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    this change gives approx. 5 secs
    Quote Originally Posted by Luigi Vercotti View Post
    ...
    here is the code I need help from you...
    Code:
    ...
    <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>
    ..
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

  • #3
    New Coder
    Join Date
    Jun 2005
    Posts
    33
    Thanks
    7
    Thanked 0 Times in 0 Posts
    ok and thank you...

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

    Code:
    <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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •