472,965 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,965 software developers and data experts.

find test answers in JAVA/ source code

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 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.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(scr een.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&i d=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&t estID=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>
Sep 6 '07 #1
2 5006
Nepomuk
3,112 Expert 2GB
Expand|Select|Wrap|Line Numbers
  1. <!--put the preloads file here as it must load before the website class file.--><!--- String manipulation class for VCE 
  2.     Properties
  3.         FixQuotes "string"
  4.  
  5. --->
  6. <script language="javascript">
  7. ...
  8.  
If I'm not very mistaken, that means it's JavaScript, not Java. Those aren't the same! Please ask in the JavaScript/Ajax Forum.

Greetings,
Nepomuk
Sep 6 '07 #2
r035198x
13,262 8TB
If I'm not very mistaken, that means it's JavaScript, not Java. Those aren't the same! Please ask in the JavaScript/Ajax Forum.

Greetings,
Nepomuk
Moved to the Javascript forum.
Sep 6 '07 #3

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

Similar topics

2
by: SubbaRao Karanam | last post by:
What does this error for the Code below java.io.StreamCorruptedException: invalid stream header at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at...
0
by: F. Da Costa | last post by:
Hi all, Although i'm not a complete newbie i do feel like one at the moment. This question concerns the use of the ResourceBundle as per the example in the Trail tutorial on java.sun.com (thus...
10
by: dave | last post by:
I am reading input from a form. I want to validate the input by making sure that the string is actually an integer. How would I do this? Do i need to convert it to a character array and break down...
18
by: jacksu | last post by:
I have a simple program to run xpath with xerces 1_2_7 XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); XPathExpression xp = xPath.compile(strXpr);...
4
by: PaperPilot | last post by:
I have a Java program that is deployed as a .jar file in which is another .jar file with the mysql library. Here is the appropriate section of code: /** * Makes the connection to the...
4
by: jingchua | last post by:
Hi, can anyone help out here???? I have the below error after compling the file. Any idea what is wrong in the declaration that was done in the above code??? Appreciate any help on shedding some...
4
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...
2
by: karinmorena | last post by:
I'm having 4 errors, I'm very new at this and I would appreciate your input. The error I get is: Week5MortgageGUI.java:151:cannot find symbol symbol: method allInterest(double,double,double)...
10
by: CodeNoob | last post by:
please help been working on a project got it down to 5 errors from 100 now i have no idea what to do. Errors: init: deps-jar: Created dir: C:\Users\Tommy\Desktop\build\classes Compiling 306...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.