JavaScript Essentials Projects

JavaScript Essentials Projects - student project

First of all, just like with HTML and CSS, I do have some previous knowledge but I learned the things I had to know rather than learning in an organized fashion. I'm taking Kalob's class to refine and improve my skills rather than learn from scratch.

The first pen here is the calculator assignment. I didn't use a form, just handled the click event for the button, and I handled the select element differently as well. I gave the entire select element an id and used that to access the value. Is what you did better or just different?

Also, I'm wondering what the consensus is about using the onevent properties vs. adding an event listener in the code. Is there a preference? Does one make more sense than the other? Just curious what you take on that would be.

Now the next project, a modal dialog box. If you look at the source files, the CSS content is much larger than the JavaScript.

When the page opens, the open button on the page is disabled because, depending on the screen width, it might be visible and it would be silly to open an already open dialog box. When you click the close button, it enables the open button.

The page overlay took the longest. I know it wasn't necessary, but I wanted to try it.