473,888 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

find test answers in JAVASCRIPT/ source code

4 New Member
Hello,

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
  1.  
  2. <!--put the preloads file here as it must load before the website class file.--><!--- String manipulation class for VCE 
  3. Properties
  4. FixQuotes "string"
  5.  
  6. --->
  7. <script language="javascript">
  8. function load2(form) {
  9. //var url = form.Llist_1.options[form.Llist_1.selectedIndex].value;
  10. var url = "../view_course.asp"; 
  11. location.href = url;
  12. return false;
  13. }
  14. function validate() {
  15. if(document.CourseChooser.Llist_1.options[document.CourseChooser.Llist_1.selectedIndex].value=="")
  16. {
  17. window.alert(' Please Select Any course first.');
  18. return false;
  19. }
  20. return true;
  21. </script>
  22.  
  23. <SCRIPT>
  24. <!--
  25. function KIM_findObj(n, d) { //v4.0
  26. var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  27. d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  28. if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  29. for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=KIM_findObj(n,d.layers[i].document);
  30. if(!x && document.getElementById) x=document.getElementById(n); return x;
  31. }
  32.  
  33. function KIM_showHideLayers() { //v3.0
  34. var i,p,v,obj,args=KIM_showHideLayers.arguments;
  35. for (i=0; i<(args.length-2); i+=3) if ((obj=KIM_findObj(args[i]))!=null) { v=args[i+2];
  36. if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
  37. obj.visibility=v; }
  38. }
  39.  
  40. function KIM_openBrWindow(theURL,winName,features) { //v2.0
  41. window.open(theURL,winName,features);
  42. }
  43. //-->
  44. </script>
  45.  
  46. <!--INCLUDE FILE="styles/kewl.css"-->
  47. <script language="javascript">
  48. <!--
  49. var win=null;
  50. function NewWindow(mypage,myname,w,h,scroll,pos){
  51. 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;}
  52. if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
  53. else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
  54. 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';
  55. win=window.open(mypage,myname,settings);
  56. }
  57. function openMedia(URL) {
  58. 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');
  59. }
  60.  
  61. function openCompactMode(){
  62. var m_compact
  63. m_compact = window.open('/favourites/compact.html', m_compact, 'toolbar=no,width=180,height=450,resizable=1');
  64. m_compact.focus();
  65. }
  66.  
  67. function load1(form) {
  68. var url = form.Llist_1.options[form.Llist_1.selectedIndex].value;
  69. location.href = url;
  70. return false;
  71. }
  72.  
  73. function popupMsg(msg) { 
  74. alert(msg);
  75. }
  76.  
  77.  
  78. function move_in(img_name,img_src){
  79. document.images[img_name].src=img_src;
  80. }
  81.  
  82. function move_out(img_name,img_src){
  83. document.images[img_name].src=img_src;
  84. }
  85.  
  86. var myimages=new Array()
  87. function preloadimages(){
  88. for (i=0;i < preloadimages.arguments.length;i++){
  89. myimages[i]=new Image()
  90. myimages[i].src=preloadimages.arguments[i]
  91. }
  92. }
  93.  
  94. function MM_openBrWindow(theURL,winName,features) { //v2.0
  95. window.open(theURL,winName,features);
  96. }
  97.  
  98. function MM_preloadImages() { //v3.0
  99. var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  100. var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  101. if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  102. }
  103.  
  104. function MM_findObj(n, d) { //v3.0
  105. var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  106. d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  107. if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  108. for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
  109. }
  110.  
  111. function MM_showHideLayers() { //v3.0
  112. var i,p,v,obj,args=MM_showHideLayers.arguments;
  113. for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
  114. if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
  115. obj.visibility=v; }
  116. }
  117.  
  118. function MM_swapImage() { //v3.0
  119. var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  120. if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  121. }
  122.  
  123. function MM_swapImgRestore() { //v3.0
  124. var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  125. }
  126.  
  127. //Validation for dropdown list
  128. function Validate(theForm)
  129. {
  130. if (theForm.Llist_1.selectedIndex == 0)
  131. {
  132. 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.");
  133. theForm.Llist_1.focus();
  134. return (false);
  135. }
  136. return (true);
  137. }
  138.  
  139.  
  140. // -->
  141. </SCRIPT>
  142.  
  143. <table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" border="0"><tr><td width="100%">
  144. <table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" border="0"><tr><td width="100%">
  145.  
  146. <center>
  147. <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="82%" id="AutoNumber2">
  148.  
  149. <tr> 
  150. <td valign="top" bgcolor="#5B90B5" dir="ltr"> 
  151. <table cellSpacing="0" cellPadding="0" border="0" bordercolor="#111111" align="center" width="100%">
  152. <tr bgcolor="#FFFFFF" valign="top"><td></td><td width="100%" align="center">
  153.  
  154. <SCRIPT language=JavaScript src="date-picker.js"></SCRIPT>
  155. <script language="Javascript">
  156. <!--
  157. //self.name="BODY"; 
  158.  
  159. //DELETE QUESTION
  160. function deleteQuestion(questionNo, testID)
  161. {
  162. if(confirm("You are going to delete this question.")){
  163. window.navigate("/tests/default.asp?action=deleteQuestion&questionNo=" + questionNo + "&testID="+testID);
  164. }
  165. }
  166.  
  167. // Mark the test
  168. function markit()
  169. {
  170. MM_showHideLayers('taketest','','show')
  171. var x = window.event.x
  172. var y = window.event.y
  173. if (navigator.appName=='Netscape')
  174. {
  175. document.layers[taketest].top = y -50
  176. document.layers[taketest].left = x- 100
  177. }
  178. else
  179. {
  180. document.all('taketest').style.top =y -50
  181. document.all('taketest').style.left =x -100
  182. }
  183. }
  184.  
  185. // Validate the test form
  186. function ValidateTest(theForm)
  187. {
  188. if (theForm.questionNo.selectedIndex == 0)
  189. {
  190. alert("The first \"questionNo\" option is not a valid selection. Please choose one of the other options.");
  191. theForm.questionNo.focus();
  192. return (false);
  193. }
  194. return (true);
  195. }
  196.  
  197. // Validate the test chooser
  198. function Validate(theForm)
  199. {
  200. if (theForm.testID.selectedIndex == 0)
  201. {
  202. alert("The first \"testID\" option is not a valid selection. Please choose one of the other options.");
  203. theForm.testID.focus();
  204. return (false);
  205. }
  206. return (true);
  207. }
  208.  
  209. // Validate the form for adding a test
  210. function ValidateNewTest(theForm)
  211. {
  212. if (theForm.asscode.selectedIndex == 0)
  213. {
  214. alert("The first \"asscode\" option is not a valid selection. Please choose one of the other options.");
  215. theForm.asscode.focus();
  216. return (false);
  217. }
  218. var checkOK = "0123456789-,";
  219. var checkStr = theForm.percentage.value;
  220. var allValid = true;
  221. var decPoints = 0;
  222. var allNum = "";
  223. for (i = 0; i < checkStr.length; i++)
  224. {
  225. ch = checkStr.charAt(i);
  226. for (j = 0; j < checkOK.length; j++)
  227. if (ch == checkOK.charAt(j))
  228. break;
  229. if (j == checkOK.length)
  230. {
  231. allValid = false;
  232. break;
  233. }
  234. if (ch != ",")
  235. allNum += ch;
  236. }
  237. if (!allValid)
  238. {
  239. alert("Please enter only digit characters in the \"percentage\" field.");
  240. theForm.percentage.focus();
  241. return (false);
  242. }
  243. return (true);
  244. }
  245.  
  246. // --- expose the hidden layer for delete 
  247. function deleteitem(itemid)
  248. {
  249. /*
  250. MM_showHideLayers('deletethis','','show')
  251. var x = window.event.x
  252. var y = window.event.y
  253. if (navigator.appName=='Netscape')
  254. {
  255. document.layers[deletethis].top = y -50
  256. document.layers[deletethis].left = x- 10
  257. }
  258. else
  259. {
  260. document.all('deletethis').style.top =y -50
  261. document.all('deletethis').style.left =x -10
  262. }
  263. //for (i=0;i<document.links.length;i++) {
  264. //alert (document.links[i].href + i);
  265. //}
  266. whereto = 'default.asp?action=deletetest&record=' + itemid
  267. document.links[95].href = whereto
  268. */
  269. if (confirm("You are going to delete this test.\nAre you sure?")){
  270. document.location = 'default.asp?action=deletetest&record=' + itemid
  271. }
  272. }
  273.  
  274. // Validate mark active
  275. function ValidateMarkActive(theForm)
  276. {
  277. if (theForm.assNo.selectedIndex == 0)
  278. {
  279. alert("The first \"assNo\" option is not a valid selection. Please choose one of the other options.");
  280. theForm.assNo.focus();
  281. return (false);
  282. }
  283. return (true);
  284. }
  285.  
  286. //popup calendar
  287. function calpopup(lnk) { 
  288. //window.open(lnk, "calendar","height=250,width=250,scrollbars=no") 
  289.  
  290. //-->
  291. </script>
  292.  
  293. <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>
  294. </HTML><!-- End Putting Code For Main Win-->
  295. </td></tr></table>
  296.  
  297. <tr bgcolor="#ff9933">
  298. <td width="100%" align="left" height="5">
  299. <table width="100%" height="5" cellpadding="0" cellspacing="0">
  300. <tr><td width="30%" align="left" height="5">
  301.  
  302. <font color="#eeeeee"><b>
  303. Question: 1 of 10
  304. </b></font>
  305.  
  306. </td>
  307. <td width="70%" align="right" height="5">
  308. <font color="#eeeeee"><b>Attempt this quiz to continue.</b></font> 
  309.  
  310. </td></tr></table> 
  311. </td></tr>
  312.  
  313.  
  314. </table>
  315.  
  316.  
Sep 6 '07 #1
4 68332
RBPierce
7 New Member
Even were the answers in the code, what makes you think anyone wants to help you cheat?
Sep 6 '07 #2
emily224
4 New Member
Even were the answers in the code, what makes you think anyone wants to help you cheat?
I understand this is considered cheating, but I have completed 15 virtual classes honestly, and this is my last class left, which is almost impossible for me to complete since the teachers have changed the curriculum and it is nearly impossible to get the correct answers. I wouldnt want this class to affect my grades, i only have 5 tests to complete. please help me.
Sep 6 '07 #3
mrhoo
428 Contributor
The source you need to examine to find the answers is Macbeth, unless you hack into the server and unravel the default.asp page.
Sep 6 '07 #4
emily224
4 New Member
The source you need to examine to find the answers is Macbeth, unless you hack into the server and unravel the default.asp page.
Even if I were to examin the source in Macbeth, the story is in several pages, as well as my test.

At the end of my test, I am asked if I would like to grade my test, which if I click, grades my test instantly, not the teacher.
Sep 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
2286
by: harish.mallipeddi | last post by:
Hi all, This might sound a bit weird but anyways here I go. Recently after witnessing the popularity of AJAX/DHTML, and after enjoying Gmail's fairly cool UI, I'm left wondering...is there going to be a point in the future when Javascript developers would like to hide their sourcecode from prying eyes because they think they'd put in enough efforts into coding and they wouldn't want to give up the commercial value in their code for...
0
960
by: Tracey | last post by:
I wonder if someone happens to know some C source code for studying purpose. Thanks!
2
1413
by: JIM.H. | last post by:
Hello, I am using asp.net c#, when users login into my application through mixed windows-form authentication, is there a way that they can see the source code, if yes, how can I prevent that? I need to prevent the source code from being viewed by users since there is a user and password declared in the connection string. Thanks, Jim.
4
1647
by: john | last post by:
I think some of the changes to Asp.net are rediculous. Take the ability to deploy source code to production that is compiled on the fly. If this is such a great model, why not distribute your source code with your Windows Forms apps too? John Powell
7
2835
by: wwxw_0 | last post by:
I am going to have some look at the ansi C implemention source of linux, such as stdio, file operation and so on, Where can I get some source code, I have downloaded linux source code but I cann't find anything about it. Does anybody know this? Thanks!
18
7191
by: Franz Steinhaeusler | last post by:
Hello, I did not find any reasonable pyhton source code beautifier program (preferable gui). Some would ask why? Program it immediatly good. (BTW: Would be a nice project, if I would have more spare time). Ich have some foreign source, which are programed in a way I don't like, so I would like to have a tool, which automatically processes following options:
2
5093
by: emily224 | last post by:
Hello, 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!! <!--put the preloads file here as it must load before the website class...
4
5124
by: Pirate | last post by:
i can't find the 'more' command source code on the internet. if you know the source code , can you tell me where it is ? i'm reading the the sources code of the linux command. Thank you!
0
9800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11176
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10772
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7988
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7144
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6012
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4638
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4241
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3246
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.