130Part IIJavaScript TutorialExercisesBefore answering the first three questions, (Web server setup)

130Part IIJavaScript TutorialExercisesBefore answering the first three questions, study the structure of the following frameset for aWeb site that lists college courses: 1.Each document that loads into the description frame has an onloadevent handler inits tag that stores a course identifier in the framesetting document s global variable called currCourse. Write the onloadevent handler that sets this value to history101 . 2.Draw a block diagram that describes the hierarchy of the windows and frames repre- sented in the frameset definition. 3.Write the JavaScript statements located in the navigation frame that loads the file french201M.html into the mechanics frame and the file french201D.html intothe description frame. 4.While a frameset is still loading, a JavaScript error message suddenly appears sayingthat window.document.navigation.form.selector is undefined. What do you think ishappening in the application s scripts, and how can you solve the problem? 5.A script in a child frame of the main window uses window.open()to generate a secondwindow. How can a script in the second window access the locationobject (URL) ofthe top (framesetting) window in the main browser window? …