pro coder needed!!!
2013-09-10, 01:56 AM,
#1
i have a progress bar in html
Code:
<progress id="bar" value="0" max="100">
    <span id="fallback"><!-- Your fallback goes here --></span>
</progress>

<script language="javascript">
window.onload = function() {
            
    var bar = document.getElementById("bar"),
    fallback = document.getElementById("fallback"),
    loaded = 0;
    
    var load = function() {
        loaded += 10;
        bar.value = loaded;
        
        /* The below will be visible if the progress tag is not supported */
        $(fallback).empty().append("HTML5 progress tag not supported: " + loaded + "% loaded");
        
        if(loaded == 100) {
            clearInterval(dummyLoad);
        }
    };
    
    var dummyLoad = setInterval(function() {
        load();
    } ,1000);        
}
</script>
but i need to like 3 times longer and while its loading i want it to say fetching codes then when its completed loading i want it to show a download button. can anyone help me i know i probably wont get an answer but its worth a try
Reply
Share This Thread :

2013-09-10, 02:22 AM,
#2
If you coded this yourself you would probably know how to add it urself
Reply
2013-09-10, 02:25 AM,
#3
I will take a look at this tomorrow okay?
Latest Thanks - View all

samatarh(2013-09-10 02:31 AM) 


[Image: wI9cuAG.png]
Reply
2013-09-10, 02:31 AM, (This post was last modified: 2013-09-10, 02:31 AM by samatarh.)
#4
(2013-09-10, 02:25 AM)Atlantis Wrote: I will take a look at this tomorrow okay?

thanks you so much

(2013-09-10, 02:22 AM)Fizz Wrote: If you coded this yourself you would probably know how to add it urself

i didnt
Reply
2013-09-10, 04:23 PM,
#5
Managed the first part
Code:
<progress id="bar" value="0" max="100" width="600px">
</progress>
<span class="label">Fetching codes</span>
<style>progress{
    width: 500px;    
}
.label{
    font-family: "Arial";
    position: absolute;
    font-size: small;
    left: 215px;
    top: 10px;
    }
</style>
<script language="javascript">
window.onload = function() {
            
    var bar = document.getElementById("bar"),  
    loaded = 0;
    
    var load = function() {
        loaded += 1;
        bar.value = loaded;
                
        if(loaded == 100) {
            clearInterval(dummyLoad);
        }
    };
    
    var dummyLoad = setInterval(function() {
        load();
    } ,50);        
}
</script>

http://jsfiddle.net/jQpdB/2/

Javascript is not my speciality though.
What you want to do is at the if(loaded == 100) add a line of code that makes appear the download button. Not sure how to do that though.
Latest Thanks - View all

samatarh(2013-09-10 11:09 PM) 


[Image: wI9cuAG.png]
Reply
2013-09-10, 08:23 PM,
#6
(2013-09-10, 04:23 PM)Atlantis Wrote: Managed the first part
Code:
<progress id="bar" value="0" max="100" width="600px">
</progress>
<span class="label">Fetching codes</span>
<style>progress{
    width: 500px;    
}
.label{
    font-family: "Arial";
    position: absolute;
    font-size: small;
    left: 215px;
    top: 10px;
    }
</style>
<script language="javascript">
window.onload = function() {
            
    var bar = document.getElementById("bar"),  
    loaded = 0;
    
    var load = function() {
        loaded += 1;
        bar.value = loaded;
                
        if(loaded == 100) {
            clearInterval(dummyLoad);
        }
    };
    
    var dummyLoad = setInterval(function() {
        load();
    } ,50);        
}
</script>

/jQpdB/2/

Javascript is not my speciality though.
What you want to do is at the if(loaded == 100) add a line of code that makes appear the download button. Not sure how to do that though.


Here you go :

Code:
http://jsfiddle.net/jQpdB/3/

Let me know if it's what you wanted.

NgL
Latest Thanks - View all

samatarh(2013-09-10 11:08 PM) 
Reply
2013-09-10, 11:09 PM, (This post was last modified: 2013-09-10, 11:10 PM by samatarh.)
#7
(2013-09-10, 08:23 PM)NgL Wrote:
(2013-09-10, 04:23 PM)Atlantis Wrote: Managed the first part
Code:
<progress id="bar" value="0" max="100" width="600px">
</progress>
<span class="label">Fetching codes</span>
<style>progress{
    width: 500px;    
}
.label{
    font-family: "Arial";
    position: absolute;
    font-size: small;
    left: 215px;
    top: 10px;
    }
</style>
<script language="javascript">
window.onload = function() {
            
    var bar = document.getElementById("bar"),  
    loaded = 0;
    
    var load = function() {
        loaded += 1;
        bar.value = loaded;
                
        if(loaded == 100) {
            clearInterval(dummyLoad);
        }
    };
    
    var dummyLoad = setInterval(function() {
        load();
    } ,50);        
}
</script>

/jQpdB/2/

Javascript is not my speciality though.
What you want to do is at the if(loaded == 100) add a line of code that makes appear the download button. Not sure how to do that though.


Here you go :

Code:
/jQpdB/3/

Let me know if it's what you wanted.

NgL

thank you but where to i put the link for the download button

(2013-09-10, 04:23 PM)Atlantis Wrote: Managed the first part
Code:
<progress id="bar" value="0" max="100" width="600px">
</progress>
<span class="label">Fetching codes</span>
<style>progress{
    width: 500px;    
}
.label{
    font-family: "Arial";
    position: absolute;
    font-size: small;
    left: 215px;
    top: 10px;
    }
</style>
<script language="javascript">
window.onload = function() {
            
    var bar = document.getElementById("bar"),  
    loaded = 0;
    
    var load = function() {
        loaded += 1;
        bar.value = loaded;
                
        if(loaded == 100) {
            clearInterval(dummyLoad);
        }
    };
    
    var dummyLoad = setInterval(function() {
        load();
    } ,50);        
}
</script>

/jQpdB/2/

Javascript is not my speciality though.
What you want to do is at the if(loaded == 100) add a line of code that makes appear the download button. Not sure how to do that though.

thanks for the help
Reply
2013-09-10, 11:25 PM,
#8
Where I put the <!-- your link here-->.

http://jsfiddle.net/jQpdB/4/

Replace that part with your link.

Credit for the button js code to NgL


[Image: wI9cuAG.png]
Reply
2013-09-10, 11:38 PM, (This post was last modified: 2013-09-10, 11:40 PM by samatarh.)
#9
i tried to click on the download button but nothing happend

are you familiar with http://www.cpaelites.com/Thread-Network-Ban widget beause i wanted to use that instead of a link if not its okay ill just use the link
Reply
2013-09-11, 12:53 AM,
#10
(2013-09-10, 11:38 PM)samatarh Wrote: i tried to click on the download button but nothing happend

are you familiar with http://www.cpaelites.com/Thread-Network-Ban widget beause i wanted to use that instead of a link if not its okay ill just use the link

The code I posted works, when you click the download link you'll be redirected to google, if you want to show a cpa widget please post your widget code here (hide your id if you want) and I'll try to implement it instead of redirecting to google.

NgL
Reply


Related Threads
Thread Author Replies Views Last Post
  [Help Needed] IG+CPA how to earn more? mdsajib 2 196 2018-08-04, 10:16 AM
Last Post: mdsajib
  Max Bounty/CPA with AdWords -- Help Needed grahammiranda13 8 623 2018-08-03, 05:29 AM
Last Post: CharlieHarper
  Mass Video Blaster Pro JEEZY 12 1,699 2018-07-21, 01:42 AM
Last Post: CharlieHarper
  Anyone used Mass Video Blaster Pro? In need of some guidance Murker 13 2,546 2018-07-20, 01:11 AM
Last Post: Silverdot
  Needed help with cent os 7 PoS3!DoN 4 341 2018-03-31, 09:15 PM
Last Post: Innowebex





About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top