Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Help with a function in a project that im building

Hi. Im building an app for managing tools. I have a modal which contain alot of functions, such as add a tool, delete a tool and etc..

the yellow button is the EDIT && SAVE button. But i have a wierd problem there, if i click on edit, i got into the edit state and when i hit save all works fine, after that one attempt if i try to add another tool or click on other stuff suddenly the button changes to EDIT state and i dont know what causes this..

this is the snapshot: https://w.trhou.se/k1zi4hds3x

Steven Parker

Steven Parker
Steven Parker
231,169 Points

To investigate this, I'd need a bit more instruction on how to operate the page — and a version with legends in English :speak_no_evil:

3 Answers

I will update the code for u

Steven Parker steven this is the updated code:

https://w.trhou.se/i61tmlifgq

I have problem with 2 things. if u click on the TOOL LIST button ull open a modal with 4 buttons. 1 button for adding tools, 1 button for delete a tool, 1 button for edit&save tools and 1 button to choose a tool to fill automatically the main inputs in the page with the toolName and toolNum.

I have problems in the third and forth button which are the edit&save button and the choose a tool button.

the yellow button is the EDIT && SAVE button. But i have a wierd problem there, if i click on edit, i got into the edit state and when i hit save all works fine, after that one attempt if i try to add another tool or click on other stuff suddenly the button changes to EDIT state and i dont know what causes this..

Steven Parker
Steven Parker
231,169 Points

If I click on "TOOL LIST" I don't see any buttons (other than the same TOOL LIST button).

Instead, I see a white page with this across the top of it:

מגירה 1 מגירה 2 מגירה 3 מגירה 4 מגירה 5 מגירה 6 שונות

Steven Parker
Steven Parker
231,169 Points

I was already tagged in the other "answer"!   :stuck_out_tongue_winking_eye: