keep it up
aslam-o-alikamView more random threads:
- STA630 Research Methods Assignment 1 Spring 2011 Idea...
- it430 assignment no 4 fall 2010 solution 14/01/2011
- MGT 502 Organizational Behavior Assignment. 2 Solution...
- Mgt602 Entreprenureship Assignment No. 1 spring fall...
- ENG201 Business and Technical English Writing vu Assignment...
- Solved assignment of cs101 no 2 fall 2011
- isl201 assignment no 1 idea Solution required spring 2011
- FIN623 Taxation Management Assignment 1 Spring 2011
- FIN623 TAXATION MANAGEMENT ASSIGNMENT#2_SOLution
- fin625 assignment no 1 april Credit and Risk Management...
cs101 assignment no 4 complete solution
HTML Code:<HTML> <HEAD> <script> function ValidateStartField() { var chk = /^\d+$/.test(document.forms["mubeen"]["start"].value); if (!chk) { window.alert("Please Enter Numeric Value in start field"); document.forms["mubeen"]["start"].value=""; document.forms["mubeen"]["start"].focus(); return false; } var x=document.forms["mubeen"]["start"].value; if (x==0 || x=="" || x<2 || x>20) { window.alert("The value of Start field should be between 2 to 20"); document.forms["mubeen"]["start"].value=""; document.forms["mubeen"]["start"].focus(); return false; } else { return true; } } function ValidateEndField() { var chk = /^\d+$/.test(document.forms["mubeen"]["end"].value); if (!chk) { window.alert("Please Enter Numeric Value in end field"); document.forms["mubeen"]["end"].value=""; document.forms["mubeen"]["end"].focus(); return false; } var x=document.forms["mubeen"]["end"].value; if (x==0 || x=="" || x<1 || x>20) { window.alert("Please Enter Value Greater then Zero"); document.forms["mubeen"]["end"].value=""; document.forms["mubeen"]["end"].focus(); return false; } } function ValidateSizeField() { var chk = /^\d+$/.test(document.forms["mubeen"]["size"].value); if (!chk) { window.alert("Please Enter Numeric Value in size field"); document.forms["mubeen"]["size"].value=""; document.forms["mubeen"]["size"].focus(); return false; } else if (document.forms["mubeen"]["size"].value<0 ) { window.alert("Please Enter Value Greater then Zero"); document.forms["mubeen"]["size"].value=""; document.forms["mubeen"]["size"].focus(); return false; } else if (document.forms["mubeen"]["size"].value>20 || document.forms["mubeen"]["size"].value <2 ) { window.alert("The value of Size field should be between 2 to 20"); document.forms["mubeen"]["size"].value=""; document.forms["mubeen"]["size"].focus(); return false; } else { true; } } function DisplyTable() { var a=document.forms["mubeen"]["start"].value; var b=document.forms["mubeen"]["end"].value; var z1=document.forms["mubeen"]["size"].value; m=parseInt(a); u=parseInt(b); b=parseInt(z1); u=u+1; b=b+1 document.write('<center><table width="80" border="0"> '); document.write('<tr>'); var c=1; for (i=a;i<u;i++) { document.write('<td>'); document.write('<center><table width="20" border="1"> Table of '+i+''); document.write('<tr>'); for (j=1;j<b;j++) { document.write('<td>' +i+ '</td>'); document.write('<td>*</td>'); document.write('<td>' +j+ '</td>'); document.write('<td>=</td>'); document.write('<td><b>' +i*j+ '</b></td>'); document.write('</tr>'); } document.write('</table></center>'); document.write('</td>'); c=c+1; if (c>4) { document.write('</tr>'); c=1; } } document.write('</tr>'); document.write('</table></center>'); } function GenerateTables() { if (!ValidateStartField()||!ValidateEndField()||!ValidateSizeField() ) { } if (ValidateStartField()&&ValidateEndField()&&ValidateSizeField() ) { } else { DisplyTable(); } } </script> </head> <body> <form name="mubeen" id="mubeen" method="post" action=""> <p align="center"><b><font size="7">Fall assignment No::: 4_2011 (CS101)</font></b></p> <p> </p> <table border=2 align=center cellpadding=6 width="280"> <tr> <td><p align="right"><b>Start:</b></td> <td><input name="start" type="text" onChange="ValidateStartField()" ></td> </tr> <tr> <td> <p align="right"><b>End: </b></td> <td><input name="end" type="text" onChange="ValidateEndField()" ></td> </tr> <tr> <td><p align="right"><b>Depth/Size:</b></td> <td><input name="size" type="text" onChange="ValidateSizeField()" ></td> </tr> <tr> <td></td> <td><input name="Generate Tables" type="button" onClick="GenerateTables()" value="Generate Tables" ></td> </tr> </table> </form> </center> <p> </p> <p> </p> <p align="center"><font color="#FF0000" size="5"><b>Composed: by Mubeen Mehmood</b></font></p> <p align="center"><b><a href="mailto:Mubeenmehmood@gmail.com"> <font color="#FF0000" size="5">Mubeenmehmood@gmail.com</font></a></b></p> <p align="center"><font color="#FF0000" size="5"><b>Id: MC110401647</b></font></p> </body> </html>
Sponsored Links
keep it up
There are currently 1 users browsing this thread. (0 members and 1 guests)