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


Possibly Related Threads...
Thread Author Replies Views Last Post
  Traffic needed for cpa offers naulodesign 7 298 2017-10-06, 01:50 AM
Last Post: stephanie12
  No conversion help needed total newbie naulodesign 3 170 2017-09-21, 12:58 PM
Last Post: PRINC3
  Needed help with cent os 7 PoS3!DoN 3 90 2017-09-15, 12:23 AM
Last Post: GopherDomains
  Please!!! Suggestions needed for more online business models (cpa apart!)? HAkorehdeh 3 98 2017-09-03, 11:25 AM
Last Post: Watt
  Fraudfilter Campaign Setting Error - Urgent Help Needed. intkhab 2 183 2017-08-08, 01:53 PM
Last Post: intkhab




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

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