+ 3
What can i do to get the functions starte, starts, startp executed?
here is the code https://code.sololearn.com/W3w3jEAfqk69/?ref=app
11 Answers
+ 4
What I would do from your code, was to handle this behaviour inside the startx() functions, handling setInterval() start/stop inside it:
https://code.sololearn.com/W2JNtcjmHXP2/?ref=app
... but second improvement I would do immediatly next if not before, was to factorize the code, so I have only one function/object reused for any instances of couple progress/button ;)
+ 9
That functions are inserted inside a setInterval method, the setInterval method is inserted inside three different functions, so... just call them:
stops();
stope();
stopp();
Tip: remove the console.log method. :3
+ 3
By calling them ^^
When need you execute them?
What's the purpose of your code?
Provide at least enough informations to be helped! ;P
+ 3
They are commented in your actual code ^^
+ 3
Factorized code in OOP style:
https://code.sololearn.com/WFbtpiiul00i/?ref=app
+ 2
Inside your startx() functions, you have this kind of code:
var vals = document.getElementById("ps").value = val3++;
That's not valid...
What's your purpose?
You doesn't need the var vars assignement: this will declare a local variable but you doesn't use it as you end function right there ^^
replace each of these lines, by just:
document.getElementById("ps").value = val3++;
Maybe it will be enpugh to solve your problem ;)
+ 2
(This works, if you uncomment too the calls to startx() functions ;P)
+ 1
I 'uncommented' them and they r still not workingđŹ
+ 1
i would release my code soon now, thanks to you đđđđđ
0
I have called them in the ef, sf, and of functions but they r still not getting executed đ
0
still cannot get it started đ° and if I uncomment starx functions then the progress bar works but they only run if u click multiple times.
I need to make it so that if u click on a button it's progress bar starts loading and u if u click the other button the rest 2 progress bar should stop and only the respective button's progress bar should run.
hope u made it clear to u đ