Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS101 Introduction to Computing Assignment No 3 solution 31 December fall 2010
#11
Confusedmileys24:Well done Mr.Nice88 keep it up.
Reply
#12
cs101 final solution for assignment no 3 with no error
just find the code
[HTML]<html>
<head>
<title></title>
<script language="javascript">
function gpa_check()
{
if(window.document.frm.gpa.value=="")
{
window.document.all.frm.gpa.style.background = 'pink';
alert("Please enter GPA");
window.document.all.frm.gpa.style.background = 'white';
window.document.frm.gpa.focus();
return false;
}
if(isNaN(window.document.frm.gpa.value))
{
window.document.all.frm.gpa.style.background = 'red';
alert("Please enter numeric value only");
window.document.all.frm.gpa.style.background = 'white';
window.document.frm.gpa.focus();
return false;
}
if((window.document.frm.gpa.value<1) || (window.document.frm.gpa.value>4))
{
window.document.all.frm.gpa.style.background = 'lightskyblue';
alert("Numeric value must be between 1 and 4");
window.document.all.frm.gpa.style.background = 'white';
window.document.frm.gpa.focus();
return false;
}
if((window.document.frm.gpa.value<=1) || (window.document.frm.gpa.value<2))
{
window.document.all.frm.gpa.style.background = 'lime';
alert("Fair :: You got D grade");
window.document.frm.gpa.focus();
return true;
}
if((window.document.frm.gpa.value<=2) || (window.document.frm.gpa.value<3))
{
window.document.all.frm.gpa.style.background = 'lime';
alert("Good :: You got C grade");
window.document.frm.gpa.focus();
return true;
}
if((window.document.frm.gpa.value<=3) || (window.document.frm.gpa.value<4))
{
window.document.all.frm.gpa.style.background = 'lime';
alert("Very Good :: You got B grade");
window.document.frm.gpa.focus();
return true;
}
if(window.document.frm.gpa.value==4)
{
window.document.all.frm.gpa.style.background = 'lime';
alert("Excellent :: You got A grade");
window.document.frm.gpa.focus();
return true;
}
}
</script>
</head>
<body>
<form action="http://www.vu.edu.pk" method="post" name="frm">
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#CCCCCC" width="800" align="center">
<tr><td height="20"></td></tr>
<tr>
<td align="center"><h2>VU ID :: Assignment 3 (CS101)</h2></td>

</tr>
<tr>
<td align="center">
<table cellpadding="0" cellspacing="0" border="1" width="400" align="center">
<tr>
<td width="66" height="50" align="center" bgcolor="#CCCCCC"><strong>GPA</strong></td>
<td bgcolor="#CCCCCC"> &nbsp;<input name="gpa" type="text" size="30" /></td>
</tr>

<tr>
<td height="50" bgcolor="#CCCCCC">&nbsp;</td>
<td bgcolor="#CCCCCC"> &nbsp;<input type="submit" value="Grade" onClick="return gpa_check();" /></td>
</tr>
</table>
</td>
</tr>
<tr><td height="20"></td></tr>

</table>
</form>
</body>
</html>
[/HTML]
Reply
#13
what abt the problemm.. Undecided
could'nt solve dat..
plz do help... :|
Reply
#14
what's your problem?
Reply
#15
How to set Pointer on the GPA field???
Reply
#16
huh.. I got dat...
Reply
#17
:d ..... Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ACC501 Business Finance Assignment No.1 Fall Semester 28th November 2012 Vuhelper 1 1,976 03-28-2020, 02:07 AM
Last Post: ArleneKline
  CS615-Software Project Management Assignment no 4 -5th Feb 2016 Vuhelper 0 1,675 02-05-2016, 10:11 PM
Last Post: Vuhelper
  Eng301 Business Communication Assignment No 3 due date 11 FEB,2016 Vuhelper 0 1,577 02-05-2016, 09:49 PM
Last Post: Vuhelper
  MGT111 Assignment No.2 Assignment Solution Due date 3rd Feb 2016 Vuhelper 0 1,835 02-03-2016, 05:37 PM
Last Post: Vuhelper
  FIN630 - Investment Analysis & Portfolio Management Solution 3rd Feb 2016 Vuhelper 0 2,251 02-03-2016, 05:34 PM
Last Post: Vuhelper
  MGT101 Financial Accounting Assignment no 2 solution 20th January 2016 Vuhelper 1 3,464 01-23-2016, 05:14 PM
Last Post: Vuhelper
  MCM101 Introduction to Mass Communication Assignment #3 January 2016 Vuhelper 1 1,951 01-23-2016, 05:13 PM
Last Post: Vuhelper
  mcm311 Reporting and subediting Assignment no 3 January 2016 Vuhelper 0 7,441 01-23-2016, 05:09 PM
Last Post: Vuhelper
  MGT602 assignment no 2 Solution due date 25th January 2016 Vuhelper 0 1,655 01-23-2016, 03:53 PM
Last Post: Vuhelper
  MGT602 Assignment no 2 Solution 20th January 2016 Vuhelper 0 7,545 01-20-2016, 06:53 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)