Javascript to find a certain text
<p>I have a table whose values are displayed from a database but on the 8th row second column it displays a value i.e. 8 which is a Canadian province i.e. 'Ontario' now  i want the name of the province instead of the values. This is what the old site used and therefore, i do not want to change the data in the database as the it is really big in size. I want to use javascript so that it only shows this for the user to read rather than changing the values in the database.</p>

<p>The data is displaed in a table</p>

<pre><code>&lt;table&gt;
&lt;tr&gt;&lt;/tr&gt;
 ...8th row&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;Value lies here i.e. '8'&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>Here is how i want it</p>

<p>if the value is "0" it should show "Alberta"</p>

<p>if the value is "1"          British Columbia</p>

<p>if the value is "2"          Manitoba</p>

<p>if the value is "3"          New Brunswick</p>

<p>if the value is "4"          Newfoundland</p>

<p>if the value is "5"          Nova Scotia</p>

<p>if the value is "6"          Northwest Territories</p>

<p>if the value is "7"          Nunavut</p>

<p>if the value is "8"          Ontario</p>

<p>if the value is "9"         Prince Edward Island</p>

<p>if the value is "10"        Quebec</p>

<p>if the value is "11"       Saskatchewan</p>

<p>if the value is "12"   Yukon</p>

<p>"Thanks but the form is on a different page than where it shows the value" It should be using a if else statement that if 8th row second column shows '8' then the value should display as 'Ontario'</p>
