pro coder needed!!!

Welcome to CPAElites - the original incentive CPA affiliate marketing forum online, solely based on "Cost Per Action".

Be a part of something great, join today! Learn CPA marketing with CPAElites, we will teach you everything such as the best CPA networks, CPA offers with highest payouts and best conversion rates, unsaturated CPA niches, most effective traffic sources and more.

samatarh

Well-known member
Joined
August 23, 2013
Messages
271
Reaction score
0
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
 

Remco

Well-known member
VIP Legends CPAElites Classic (1.0)
VIP Elites CPAElites Classic (1.0)
Joined
May 23, 2013
Messages
851
Reaction score
3
Website
google.com
If you coded this yourself you would probably know how to add it urself
 

Atlantis

Well-known member
VIP Legends CPAElites Classic (1.0)
VIP Elites CPAElites Classic (1.0)
Joined
August 27, 2013
Messages
390
Reaction score
0
I will take a look at this tomorrow okay?
 

Atlantis

Well-known member
VIP Legends CPAElites Classic (1.0)
VIP Elites CPAElites Classic (1.0)
Joined
August 27, 2013
Messages
390
Reaction score
0
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.
 

NgL

Active member
Joined
August 22, 2013
Messages
32
Reaction score
0
Atlantis said:
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
 

samatarh

Well-known member
Joined
August 23, 2013
Messages
271
Reaction score
0
NgL said:
Atlantis said:
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


Atlantis said:
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
 

samatarh

Well-known member
Joined
August 23, 2013
Messages
271
Reaction score
0
i tried to click on the download button but nothing happend


are you familiar with clean files widget beause i wanted to use that instead of a link if not its okay ill just use the link
 

NgL

Active member
Joined
August 22, 2013
Messages
32
Reaction score
0
samatarh said:
i tried to click on the download button but nothing happend


are you familiar with clean files 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
 
Top Bottom