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 6 of 6
  1. #1
    New Coder
    Join Date
    Oct 2012
    Location
    Belgium
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Found script show loading screen then on text, Error

    Hi!

    So, i found a script but i think its not complete
    I tried everything but still not working.

    Here is the html, css and js: http://jsbin.com/IzuleXi/1/edit?html,css,js,output

    The thing is. When website loaded the wait some seconds then sow loading image and after x seconds the show the ON or something.
    Last edited by pcwolf; 01-02-2014 at 02:53 PM.

  • #2
    New Coder
    Join Date
    Oct 2012
    Location
    Belgium
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts
    So, no one can help my ?

    I try everything but it doesn't working....

  • #3
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,092
    Thanks
    23
    Thanked 594 Times in 593 Posts
    Couldn't wait one day for an answer?
    Post your code here, not in jsbin. It don't work for me and maybe a lot of us, so I don't see you code. Same as if you don't have any.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #4
    New Coder
    Join Date
    Oct 2012
    Location
    Belgium
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts
    My fault, i though that the code can be read...

    javascript:

    Code:
    function doSomething() {
    		
    		window.setTimeout(first, 1000);
    		window.setTimeout(second, 2000);
    		window.setTimeout(third, 3000);
    		window.setTimeout(four, 6000);
    		window.setTimeout(five, 8000);
    		window.setTimeout(six, 10000);
    		
    		function first(){
    		document.getElementById("server").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function second(){
    		document.getElementById("scan").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function third(){
    		document.getElementById("files").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function four(){
    		document.getElementById("server").setAttribute("class", "green");
    		document.getElementById("server").innerHTML = 'ON';
    		}
    		
    		function five(){
    		document.getElementById("scan").setAttribute("class", "green");
    		document.getElementById("scan").innerHTML = 'ON';
    		}
    		
    		function six(){
    		document.getElementById("files").setAttribute("class", "green");
    		document.getElementById("files").innerHTML = 'ON';
    		}
    		
        }
        else {
           /* alert('Imat'); */
    	   function had(){
    		window.setTimeout(first, 1000);
    		window.setTimeout(second, 1500);
    		window.setTimeout(third, 2000);
    		window.setTimeout(four, 3000);
    		window.setTimeout(five, 3500);
    		window.setTimeout(six, 4000);
    		
    		function first(){
    		document.getElementById("server").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function second(){
    		document.getElementById("scan").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function third(){
    		document.getElementById("files").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function four(){
    		document.getElementById("server").setAttribute("class", "green");
    		document.getElementById("server").innerHTML = 'ON';
    		}
    		
    		function five(){
    		document.getElementById("scan").setAttribute("class", "green");
    		document.getElementById("scan").innerHTML = 'ON';
    		}
    		
    		function six(){
    		document.getElementById("files").setAttribute("class", "green");
    		document.getElementById("files").innerHTML = 'ON';
    		}
    		
    		}
    		
    	   had();
        }
    }
    Css:
    Code:
    .sidebarblocks {
        float: left;
        position: relative;
        padding-top: 30px;
        padding-bottom: 25px;
    }
    
    .sidebarblocks ul li {
    
    }
    
    .box_wrap_sidebar {
        margin-left: 20px;
        position: relative;
        width: 270px !important;
    }
    .box_wrap {
        border: 1px solid #CCCCCC;
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        margin-top: 50px;
        position: relative;
        width: 900px;
    }
    
    .box_title {
        background: -moz-linear-gradient(center top , #3B5998 0%, #264A7E 100%) repeat scroll 0 0 rgba(0, 0, 0, 0);
        border-top-left-radius: 4px;
        border-top-right-radius: 4px;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5) inset, 0 0 0 2px rgba(255, 255, 255, 0.2) inset, 0 2px 5px -2px rgba(0, 0, 0, 0.8);
        padding: 5px;
        text-align: center;
    }
    
    .box_description {
        background: -moz-linear-gradient(center bottom , rgba(217, 218, 213, 0.6) 50%, rgba(250, 249, 245, 0.6) 100%) repeat scroll 0 0 rgba(0, 0, 0, 0);
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5) inset, 0 0 0 2px rgba(255, 255, 255, 0.2) inset, 0 2px 5px -2px rgba(0, 0, 0, 0.8);
        color: #555555;
        font-size: 10pt;
        padding: 20px;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .box_title h20 {
        color: #FFFFFF;
        font: 400 11pt 'Signika Negative',sans-serif;
        margin: 0;
        text-align: center;
        text-shadow: 1px 2px 10px rgba(155, 158, 162, 0.7);
    }
    
    .vtor-modul {
        overflow: hidden;
    }
    
    .vtor-modul ul {
        list-style: none outside none;
        margin: 0;
        padding: 0;
    }
    ul {
        list-style-type: none;
        margin: 2px;
        padding: 0;
    }
    ul {
        list-style: none outside none;
    }
    ul {
        list-style-type: none;
    }
    
    .vtor-modul p {
        border-left: 1px solid rgba(46, 46, 46, 0.12);
        color: #003948;
        float: left;
        font-weight: bolder;
        height: 29px;
        line-height: 16px;
        margin: 0;
        padding: 7px 12px;
        text-transform: uppercase;
        width: 58px;
    }
    
    .vtor-modul strong {
        color: #000000;
        display: block;
        font-size: 14px;
        text-align: center;
    }
    
    .green {
        color: #32CD32;
    }
    
    .checkimg {
        height: 10px;
        margin-top: 2px;
    }
    .checkimg img {
        height: 10px;
        margin-top: 2px;
    }
    html:

    Code:
    <!DOCTYPE html>
    <html lang="en">
      <head>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
        <meta charset="utf-8">
        
      </head>
      <body>
    <div class="sidebarblocks">
    				<div class="box_wrap box_wrap_sidebar">
    							<div class="box_title"><h2>Server status</h2></div>
    							<div class="box_description" style="padding: 0px;">
    								<div class="vtor-modul">
    					
    									<ul>
    										<li>
    											<p style="border-left: 0;">Server<strong class="statuson"><span id="server"> </span></strong></p>
    										</li>
    										
    										<li>
    										<p> Scan<strong class="statuson"><span id="scannerot"> </span></strong></p>
    										</li>
    										
    										<li>
    										<p style="width: 80px;">Files<strong class="statuson"><span id="decrypterot"> </span></strong></p>
    										</li>
    									
    									
    									</ul>
    					
    					</div>
    							</div>
    				</div>
      
      </body>
    </html>

  • #5
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,092
    Thanks
    23
    Thanked 594 Times in 593 Posts
    Yep, your missing a whole lotta stuff. It's easy to see what it's suppose to do, but even that wont work.
    It's suppose to put an image (a waiting for results type image) in the three spans. But the ID of span "server" is the only one that matches. And when done searching or loading it changes to a green ON. But you have no function to indicate when it's(what ever it is) done. Or start for that matter.

    If you can write the functions needed to start and stop the process we can make this work, but I think I'd go back to the place where you found this code and ask for the rest of the story.
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #6
    New Coder
    Join Date
    Oct 2012
    Location
    Belgium
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I don't know if you need cookies for this, here is the rest of the code.

    js:

    Code:
    function getCookie(name) {
        var dc = document.cookie;
        var prefix = name + "=";
        var begin = dc.indexOf("; " + prefix);
        if (begin == -1) {
            begin = dc.indexOf(prefix);
            if (begin != 0) return null;
        }
        else
        {
            begin += 2;
            var end = document.cookie.indexOf(";", begin);
            if (end == -1) {
            end = dc.length;
            }
        }
        return unescape(dc.substring(begin + prefix.length, end));
    } 
    
    function removebtn() {
        var elem = document.getElementById('bidna');
        elem.parentNode.removeChild(elem);
        return false;
    }
    
    function licencata() {
    	var kukito = getCookie("lic");
    	
    	if (kukito == null) {
    	
    	document.getElementById("licenca").value = "No licence, Generate one.";
    	document.getElementById("textatt").innerHTML = "Press the 'GENERATE LICENCE' button located below to generate unique licence";
    	} else {
    	document.getElementById("licenca").value = kukito;
    	removebtn();
    	
    	var eles = document.getElementById('bidna').getElementsByTagName('h2');
    	for (var z=0; z < eles.length; z++)
       eles[z].onclick = function() {
         return false;
       }
    	}
    
    }
    
    function doSomething() {
        var myCookie = getCookie("name");
    
        if (myCookie == null) {
            /* alert('NEmat'); */
    	
    		
    		var cookievalue = "zateri";
    		document.cookie="name=" + cookievalue;
    		/* alert("Setting Cookies : " + "name=" + cookievalue ); */
    		
    		window.setTimeout(first, 1000);
    		window.setTimeout(second, 2000);
    		window.setTimeout(third, 3000);
    		window.setTimeout(four, 6000);
    		window.setTimeout(five, 8000);
    		window.setTimeout(six, 10000);
    		
    		function first(){
    		document.getElementById("server").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function second(){
    		document.getElementById("scan").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function third(){
    		document.getElementById("files").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function four(){
    		document.getElementById("server").setAttribute("class", "green");
    		document.getElementById("server").innerHTML = 'ON';
    		}
    		
    		function five(){
    		document.getElementById("scan").setAttribute("class", "green");
    		document.getElementById("scan").innerHTML = 'ON';
    		}
    		
    		function six(){
    		document.getElementById("files").setAttribute("class", "green");
    		document.getElementById("files").innerHTML = 'ON';
    		}
    		
        }
        else {
           /* alert('Imat'); */
    	   function had(){
    		window.setTimeout(first, 1000);
    		window.setTimeout(second, 1500);
    		window.setTimeout(third, 2000);
    		window.setTimeout(four, 3000);
    		window.setTimeout(five, 3500);
    		window.setTimeout(six, 4000);
    		
    		function first(){
    		document.getElementById("server").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function second(){
    		document.getElementById("scan").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function third(){
    		document.getElementById("files").innerHTML = '<img class="checkimg" src="http://oi41.tinypic.com/adhmw2.jpg" alt="Checking" />';
    		}
    		
    		function four(){
    		document.getElementById("server").setAttribute("class", "green");
    		document.getElementById("server").innerHTML = 'ON';
    		}
    		
    		function five(){
    		document.getElementById("scan").setAttribute("class", "green");
    		document.getElementById("scan").innerHTML = 'ON';
    		}
    		
    		function six(){
    		document.getElementById("files").setAttribute("class", "green");
    		document.getElementById("files").innerHTML = 'ON';
    		}
    		
    		}
    		
    	   had();
        }
    }
    
    function menjaj()
    	{
    		doSomething();
    		licencata();
    		
    	}
    	
    function genlicence() {
    	var r_text = new Array ();
    	var bidna = true;
    	r_text[0] = "WH3-3HS4-1ZQ4P";
    	r_text[1] = "WH3-5P9X-W83Z";
    	r_text[2] = "WH3-Z9M2-5QRV";
    	r_text[3] = "WH3-BB1U-IM6K";
    	r_text[4] = "WH3-M4SK-9H6Z";
    	r_text[5] = "WH3-K8RS-S4N4";
    	r_text[6] = "WH3-M4G1-S7X0";
    	var i = Math.random();
    	i = 7 * i;
    	i = Math.floor(i);
    	var i = Math.floor(7*Math.random())
    	document.getElementById("licenca").value = r_text[i];
    	var kukz = document.getElementById("licenca").value;
    	document.cookie="lic=" + kukz;
    	var eles = document.getElementById('bidna').getElementsByTagName('h2');
    	for (var z=0; z < eles.length; z++)
       eles[z].onclick = function() {
         return false;
       }
       
       
    	
    }
    I think the div tags are fine because after the loading screen it shows just ON in the div tags.


  •  

    Posting Permissions

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