Question: Handling Errors in Javascript if they remove checkmarks from all the crop boxes. 1. Use the file manager for your operating system to copy all

Handling Errors in Javascript

Handling Errors in Javascript if they remove checkmarks from all the crop

if they remove checkmarks from all the crop boxes. 1. Use the file manager for your operating system to copy all the files and subfolders from the Chapter04/ Chapter directory in your Data Files, and paste them in the Chapter04/ HandsOnProject4-1 folder. Verify that you still have a copy in the Chapter04/Chapter directory. 2. In your text editor, open tuba.js from the Chapter/HandsOnProject4-1 folder, and then in the comment section, replace the text "Chapter case" with Hands-on Project 4-1. 3. Scroll down to the verifyCrops() function, and then delete the line testFormCompleteness(); so the command block is empty. 4. Enter the following try statement within the command block of the verifyCrops() function: 5. Note that the code shown in Steps 4 and 5 is not free of bugs. You will debug the code later in the next project. a. Below the try statement but before the closing } of the verifyCrops()function, add the following catch() statement: b. Scroll to the top of the document, and then change the values for the variables acresComplete, cropsComplete, and monthsComplete to false. Note that the value for the fuelComplete variable should remain true. c. Save your changes to js, and open tractor.htm in a browser, and then test the crops boxes by selecting some and then unselecting all of them. Notice that an error message is displayed when no crops boxes are checked, as shown in Figure 4-30, and the message is removed when any crops box is checked. Figure 4-30: Error message displayed d. Close the tractor.htm file in your browser

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!