Wednesday, May 16, 2012

Extract Name from an HTML page using jquery

My University provides grade card, that is really very confusing and calculating final result is really very tough. Because all subjects has different weightage for final.



I am developing a BCA result calculator. Here is this https://www.bobdn.com/IGNOU_BCA_Result.aspx



I have following code in a div (I can't change it because it is returned from the University website)



<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>Grade Card</TITLE>
<h1> Grade Card </h1>
<h1>&nbsp;</h1>
(All programs Except for BIT/ADIT)

</HEAD>
<BODY bgcolor=Lavender>


<form name=FRMResult method=post action=Result.asp>
<center> <font size=+2> Indira Gandhi National Open University </font>
<br> Grade Card Status as on May 09, 2012<br> (For information only)</center>
Enrolment Number: 092853268<br> Name: SHASHWAT TRIPATHI<br> Program: BCA<p><font size=-1> The Status is indicative only & cannot be used as a substitute for the final grade card which is sent by SRE at the end of a semester.</font><br><table border=1 width='80%' background='ignou.gif'><tr><td width='10%'> Course Code </td><td width='10%' align=center> Asgn1 </td><td width='10%' align=center> Asgn2 </td><td width='10%' align=center> Asgn3 </td><td width='10%' align=center> Asgn4 </td><td width='10%'> Term End Theory </td><td width='10%'> Term End Practical</td><td width='10%'> Status </td></tr><tr><td width='5%' >BCS61</td><td width='10%' >80</td><td width='10%' >73</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >40</td><td width='10%' >67</td><td width='20%' >Completed</td></tr><tr><td width='5%' >BSHF1</td><td width='10%' >35</td><td width='10%' >35</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >41</td><td width='10%'>-</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS5</td><td width='10%' >80</td><td width='10%' >87</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >48</td><td width='10%'>-</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS6</td><td width='10%' >70</td><td width='10%' >67</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >59</td><td width='10%'>-</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS60</td><td width='10%' >90</td><td width='10%' >87</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >53</td><td width='10%'>-</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS610</td><td width='10%' >60</td><td width='10%' >60</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >48</td><td width='10%'>-</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS611</td><td width='10%' >80</td><td width='10%' >80</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >52</td><td width='10%' >88</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS612</td><td width='10%' >70</td><td width='10%' >67</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >70</td><td width='10%'>-</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS62</td><td width='10%' >80</td><td width='10%' >80</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >40</td><td width='10%' >91</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS63</td><td width='10%' >90</td><td width='10%' >93</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >48</td><td width='10%' >85</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS64</td><td width='10%' >59</td><td width='10%' >59</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >40</td><td width='10%'>-</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS65</td><td width='10%' >50</td><td width='10%' >53</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >97</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS66</td><td width='10%' >80</td><td width='10%' >80</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >57</td><td width='10%'>-</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS67</td><td width='10%' >83</td><td width='10%' >83</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >93</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS68</td><td width='10%' >63</td><td width='10%' >63</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >62</td><td width='10%' >77</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS70</td><td width='10%' >70</td><td width='10%' >67</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >45</td><td width='10%'>-</td><td width='20%' >Completed</td></tr><tr><td width='5%' >CS71</td><td width='10%' >90</td><td width='10%' >87</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%'>-</td><td width='20%' >Not Completed</td></tr><tr><td width='5%' >FST1</td><td width='10%' >66</td><td width='10%' >66</td><td width='10%' >-</td><td width='10%' >-</td><td width='10%' >73</td><td width='10%'>-</td><td width='20%' >Completed</td></tr></table><br/><font size=-1 >Not with standing the result published/declared, any case of UFM(Unfairmeans) if found will make such result null and void.</font><p>&nbsp;</p><u>Note:- Assignment 4 and TE Practical do not apply to all the courses.</u><font size=-1 color=blue><center>Disclaimer: This electronically generated information does not have any legal validity</font></center>
<P>&nbsp;</P>



<a href="javascript:history.back()">Back </a>

<!--#'include file=scroll.js-->

</BODY>
</HTML>


Suppose I put this code in a div with ID tempDiv
Now how can I extract student's Name and Program from the response the tempDiv



Also, here is a jsFiddle that shows the relevant part of the HTML from the University.





No comments:

Post a Comment