MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / submitBudgetForm

Method submitBudgetForm

assets/js/Budget.js:20–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19 //submit budget method
20 submitBudgetForm(){
21 const value = this.budgetInput.value;
22 if(value === '' || value < 0){
23 this.budgetFeedback.classList.add('showItem');
24 this.budgetFeedback.innerHTML = `<p>value cannot be empty or negative</p>`;
25 const self = this;
26 setTimeout(function(){
27 self.budgetFeedback.classList.remove('showItem');
28 }, 3000);
29 } else {
30 this.budgetAmount.textContent = value;
31 this.budgetInput.value = '';
32 this.showBalance();
33 }
34 }
35
36 //show balance
37 showBalance(){

Callers 1

eventListenersFunction · 0.95

Calls 1

showBalanceMethod · 0.95

Tested by

no test coverage detected