I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer must be embedded somewhere in the source code, and I would like to know if anyone knows where to find the correct answer.
I would greatly appreciate it!!
Thanks!!
Expand|Select|Wrap|Line Numbers
- <!--put the preloads file here as it must load before the website class file.--><!--- String manipulation class for VCE
- Properties
- FixQuotes "string"
- --->
- <script language="javascript">
- function load2(form) {
- //var url = form.Llist_1.options[form.Llist_1.selectedIndex].value;
- var url = "../view_course.asp";
- location.href = url;
- return false;
- }
- function validate() {
- if(document.CourseChooser.Llist_1.options[document.CourseChooser.Llist_1.selectedIndex].value=="")
- {
- window.alert(' Please Select Any course first.');
- return false;
- }
- return true;
- }
- </script>
- <SCRIPT>
- <!--
- function KIM_findObj(n, d) { //v4.0
- var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
- d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
- if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
- for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=KIM_findObj(n,d.layers[i].document);
- if(!x && document.getElementById) x=document.getElementById(n); return x;
- }
- function KIM_showHideLayers() { //v3.0
- var i,p,v,obj,args=KIM_showHideLayers.arguments;
- for (i=0; i<(args.length-2); i+=3) if ((obj=KIM_findObj(args[i]))!=null) { v=args[i+2];
- if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
- obj.visibility=v; }
- }
- function KIM_openBrWindow(theURL,winName,features) { //v2.0
- window.open(theURL,winName,features);
- }
- //-->
- </script>
- <!--INCLUDE FILE="styles/kewl.css"-->
- <script language="javascript">
- <!--
- var win=null;
- function NewWindow(mypage,myname,w,h,scroll,pos){
- if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.rand om()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen.height-h)-75)):100;}
- if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
- else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
- settings='width='+w+',height='+h+',top='+TopPositi on+',left='+LeftPosition+',scrollbars='+scroll+',l ocation=no,directories=no,status=no,menubar=no,too lbar=no,resizable=no';
- win=window.open(mypage,myname,settings);
- }
- function openMedia(URL) {
- window.open(URL,'Multimedia_Center','toolbar=no,lo cation=no,directories=no,status=no,menubar=no,resi zable=no,copyhistory=no,scrollbars=no,width=500,he ight=500');
- }
- function openCompactMode(){
- var m_compact
- m_compact = window.open('/favourites/compact.html', m_compact, 'toolbar=no,width=180,height=450,resizable=1');
- m_compact.focus();
- }
- function load1(form) {
- var url = form.Llist_1.options[form.Llist_1.selectedIndex].value;
- location.href = url;
- return false;
- }
- function popupMsg(msg) {
- alert(msg);
- }
- function move_in(img_name,img_src){
- document.images[img_name].src=img_src;
- }
- function move_out(img_name,img_src){
- document.images[img_name].src=img_src;
- }
- var myimages=new Array()
- function preloadimages(){
- for (i=0;i < preloadimages.arguments.length;i++){
- myimages[i]=new Image()
- myimages[i].src=preloadimages.arguments[i]
- }
- }
- function MM_openBrWindow(theURL,winName,features) { //v2.0
- window.open(theURL,winName,features);
- }
- function MM_preloadImages() { //v3.0
- var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
- var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
- if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
- }
- function MM_findObj(n, d) { //v3.0
- var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
- d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
- if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
- for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
- }
- function MM_showHideLayers() { //v3.0
- var i,p,v,obj,args=MM_showHideLayers.arguments;
- for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
- if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
- obj.visibility=v; }
- }
- function MM_swapImage() { //v3.0
- var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
- if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
- }
- function MM_swapImgRestore() { //v3.0
- var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
- }
- //Validation for dropdown list
- function Validate(theForm)
- {
- if (theForm.Llist_1.selectedIndex == 0)
- {
- alert("The first option on the course menu is not a valid selection, rather it is an instruction for you to choose a course. The dropdown list contains the courses from which you must select one. Please Select your course before pressing GO. You may also use one of the filter links below the course list to change the list before selecting the course to enter.");
- theForm.Llist_1.focus();
- return (false);
- }
- return (true);
- }
- // -->
- </SCRIPT>
- <table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" border="0"><tr><td width="100%">
- <table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" border="0"><tr><td width="100%">
- <center>
- <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="82%" id="AutoNumber2">
- <tr>
- <td valign="top" bgcolor="#5B90B5" dir="ltr">
- <table cellSpacing="0" cellPadding="0" border="0" bordercolor="#111111" align="center" width="100%">
- <tr bgcolor="#FFFFFF" valign="top"><td></td><td width="100%" align="center">
- <SCRIPT language=JavaScript src="date-picker.js"></SCRIPT>
- <script language="Javascript">
- <!--
- {
- //self.name="BODY";
- }
- //DELETE QUESTION
- function deleteQuestion(questionNo, testID)
- {
- if(confirm("You are going to delete this question.")){
- window.navigate("/tests/default.asp?action=deleteQuestion&questionNo=" + questionNo + "&testID="+testID);
- }
- }
- // Mark the test
- function markit()
- {
- MM_showHideLayers('taketest','','show')
- var x = window.event.x
- var y = window.event.y
- if (navigator.appName=='Netscape')
- {
- document.layers[taketest].top = y -50
- document.layers[taketest].left = x- 100
- }
- else
- {
- document.all('taketest').style.top =y -50
- document.all('taketest').style.left =x -100
- }
- }
- // Validate the test form
- function ValidateTest(theForm)
- {
- if (theForm.questionNo.selectedIndex == 0)
- {
- alert("The first \"questionNo\" option is not a valid selection. Please choose one of the other options.");
- theForm.questionNo.focus();
- return (false);
- }
- return (true);
- }
- // Validate the test chooser
- function Validate(theForm)
- {
- if (theForm.testID.selectedIndex == 0)
- {
- alert("The first \"testID\" option is not a valid selection. Please choose one of the other options.");
- theForm.testID.focus();
- return (false);
- }
- return (true);
- }
- // Validate the form for adding a test
- function ValidateNewTest(theForm)
- {
- if (theForm.asscode.selectedIndex == 0)
- {
- alert("The first \"asscode\" option is not a valid selection. Please choose one of the other options.");
- theForm.asscode.focus();
- return (false);
- }
- var checkOK = "0123456789-,";
- var checkStr = theForm.percentage.value;
- var allValid = true;
- var decPoints = 0;
- var allNum = "";
- for (i = 0; i < checkStr.length; i++)
- {
- ch = checkStr.charAt(i);
- for (j = 0; j < checkOK.length; j++)
- if (ch == checkOK.charAt(j))
- break;
- if (j == checkOK.length)
- {
- allValid = false;
- break;
- }
- if (ch != ",")
- allNum += ch;
- }
- if (!allValid)
- {
- alert("Please enter only digit characters in the \"percentage\" field.");
- theForm.percentage.focus();
- return (false);
- }
- return (true);
- }
- // --- expose the hidden layer for delete
- function deleteitem(itemid)
- {
- /*
- MM_showHideLayers('deletethis','','show')
- var x = window.event.x
- var y = window.event.y
- if (navigator.appName=='Netscape')
- {
- document.layers[deletethis].top = y -50
- document.layers[deletethis].left = x- 10
- }
- else
- {
- document.all('deletethis').style.top =y -50
- document.all('deletethis').style.left =x -10
- }
- //for (i=0;i<document.links.length;i++) {
- //alert (document.links[i].href + i);
- //}
- whereto = 'default.asp?action=deletetest&record=' + itemid
- document.links[95].href = whereto
- */
- if (confirm("You are going to delete this test.\nAre you sure?")){
- document.location = 'default.asp?action=deletetest&record=' + itemid
- }
- }
- // Validate mark active
- function ValidateMarkActive(theForm)
- {
- if (theForm.assNo.selectedIndex == 0)
- {
- alert("The first \"assNo\" option is not a valid selection. Please choose one of the other options.");
- theForm.assNo.focus();
- return (false);
- }
- return (true);
- }
- //popup calendar
- function calpopup(lnk) {
- //window.open(lnk, "calendar","height=250,width=250,scrollbars=no")
- }
- //-->
- </script>
- <div id="taketest" style="position: absolute; left: 269; top: 109; width: 319; height: 102; z-index: 1; visibility: hidden"> <table cellpadding="5" cellspacing="0" bgcolor="#FFFF99" width="100%" border=0> <tr><td colspan="2"> <p align="center"><font face="Verdana" size="2"><b> Are you sure you want to mark your test now. You will not be able to change your answers once it is graded.</b></font></td></tr> <tr><td><p align="center"><font face="Verdana" size="2"><b><a onclick="MM_showHideLayers('taketest','','hide')" href="#">No</a></b></font></td><td><p align="center"><font face="Verdana" size="2"><b><a href="default.asp?action=markme&testID=oltest7" >Yes</a></b></font></td></tr> </table></div><form method="POST" action="default.asp?action=saveme&thisQuestion=1&id=4159&TestID=oltest7"><b><font color="#336600">Question 1</b><br></font><br><table border=0><tr><td>At the beginning of the play Macbeth is</td></tr></table> <br><Table width="100%" border="0"><tr><td width="30"></TD><td></td></tr><tr><td valign=top><input type="radio" name="myAnswer" value="1"> </td><td valign=top>A. Lord of Farres <br><tr><td valign=top><input type="radio" name="myAnswer" value="2"> </td><td valign=top>B. Thane of Cawdor<br><br><tr><td valign=top><input type="radio" name="myAnswer" value="3"> </td><td valign=top>C. Thane of Glamis<br><br><tr><td valign=top><input type="radio" name="myAnswer" value="4"> </td><td valign=top>D. next one line to the throne <br><tr><td valign=top><tr><td valign=top></Table><br><input type="submit" class="button" value="Save answer" name="B1"><br> <a href="default.asp?action=taketest&thisQuestion=2&testID=oltest7"><IMG SRC="images/arrowRT1.gif" border="0" align="Middle" alt="Next"></A> <a href="default.asp?action=taketest&thisQuestion=10&testID=oltest7"><IMG SRC="images/arrowRFull1.gif" border="0" align="Middle" alt="Last"></A></form><hr>Select your answer choice by clicking inside one of small circles. When you are happy with your choice, click the <i>Save answer</i> button. <font color="red"><b>Click <IMG SRC="images/arrowRT1.gif" border="0" align="Middle" alt="Next"> to go to the next question</b></font>, or <IMG SRC="images/arrowlf1.gif" border="0" align="Middle" alt="Previous"> to go to the previous question. Click <IMG SRC="images/arrowRFull1.gif" border="0" align="Middle" alt="Last"> to go to the last question or <IMG SRC="images/arrowLFull1.gif" border="0" align="Middle" alt="First"> to go to the first question. <font color="red">Remember to save your answer before you move off this page</font>.</BODY>
- </HTML><!-- End Putting Code For Main Win-->
- </td></tr></table>
- <tr bgcolor="#ff9933">
- <td width="100%" align="left" height="5">
- <table width="100%" height="5" cellpadding="0" cellspacing="0">
- <tr><td width="30%" align="left" height="5">
- <font color="#eeeeee"><b>
- Question: 1 of 10
- </b></font>
- </td>
- <td width="70%" align="right" height="5">
- <font color="#eeeeee"><b>Attempt this quiz to continue.</b></font>
- </td></tr></table>
- </td></tr>
- </table>