Friday, June 9, 2017

Lab 17

         This lab consisted of using learning how to display a confirm box when an individual clicks on a button. When creating a confirm box we also had to understand and learn about if and else statements. An if statement will allow a specific block of code to be executed if the indicated condition is true. An else statement will allow a specific bock of code to be executed if the indicated condition is false. A condition is an expression that evaluates to be true or false. In this lab since a confirm box displays a dial box with a specified message along with an OK and a Cancel, we will use the if and else statements so when a person clicks ok something will happen and if a person clicks cancel another thing will occur. Since I used the confirm () method, when an individual clicks ok, it returns true (if statement)  and in any case when an individual clicks cancel, it returns false. However, before creating the confirm box, I had to create a form asking the user to inout two values. which is something I learned back in lab 12. Then I created the confirm box which asked the individual "Do you want to add these two values?" When clicked ok, then it will add the two values, if clicked cancel then it will not.
         This lab was sort of difficult for me since we had to use if and else statements. I had to read articles to learn about if and else statements. I was scared of this lab because during our APCSP create task I had a hard time doing if and else statements. However, after this lab I was able to understand the process of an if and else statements. Most of the components such as creating a form was a skill learned in previous labs. Therefore, it was already easy creating a form. I was really excited to do this lab because before joining the web design academy I would see these confirm boxes in websites but I would not know who people were bale to make them. However, after this lab I realized it isn't so hard to create a confirm box as I thought. I hope in future labs I will see components I see in other websites online.  I know this lab will help me in the future because I can use confirm boxes in my portfolio or in any other project.

Layout of Lab 17
When Confirm Box Appears
     
Result After Clicking "OK" in Confirm Box
 

No comments:

Post a Comment