01-06-2011, 07:07 AM
mileys24:Well done Mr.Nice88 keep it up.
|
CS101 Introduction to Computing Assignment No 3 solution 31 December fall 2010
|
|
01-06-2011, 07:07 AM
mileys24:Well done Mr.Nice88 keep it up.
01-06-2011, 03:21 PM
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"> <input name="gpa" type="text" size="30" /></td> </tr> <tr> <td height="50" bgcolor="#CCCCCC"> </td> <td bgcolor="#CCCCCC"> <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]
01-09-2011, 04:47 AM
what abt the problemm..
![]() could'nt solve dat.. plz do help... :|
01-09-2011, 04:49 AM
what's your problem?
01-09-2011, 05:21 AM
How to set Pointer on the GPA field???
01-09-2011, 05:33 AM
huh.. I got dat...
01-09-2011, 05:35 AM
:d .....
|
|
« Next Oldest | Next Newest »
|