A
Alan Gresley
Hello
I am new to javascript. What I would like is to change the value of a
month in MM format into the months proper name. This is the code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Data Table</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=utf-8" />
<script type="text/javascript">
function getElements()
{
var x=document.getElementsByName("span");
{
var month=x = new Array();
month [01] = "January";
month [02] = "February";
month [03] = "March";
month [04] = "April";
month [05] = "May";
month [06] = "June";
month [07] = "July";
month [08] = "August";
month [09] = "September";
month [10] = "October";
month [11] = "November";
month [12] = "December";
for (i=01;i<x.length;i++)
{
document.write(x );
}
}
}
</script>
</head>
<body>
<table>
<thead>
<tr><th>Year</th><th>?</th><th>Forname(s)</th><th>Surname</th></tr>
</thead>
<tbody>
<tr><td>1840<span>02</span>03</td><td></td><td>Elizabeth</
td><td><a>ABBOTT</a></td></tr>
<tr><td>1800<span>03</span>03</td><td></td><td>Esther</td><td>ABBOTT</
td></tr>
<tr><td>1830<span>04</span>03</td><td></td><td>Franciscus</
td><td>ALEXANDER</td></tr>
<tr><td>1800<span>01</span>20</td><td></td><td>?</td><td>ALLEN</td></
tr>
</tbody>
</table>
</body>
</html>
So the first cell in the first row would appear "1840February03"
Any assitance would gladly be welcome, Thank you
Alan
I am new to javascript. What I would like is to change the value of a
month in MM format into the months proper name. This is the code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Data Table</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=utf-8" />
<script type="text/javascript">
function getElements()
{
var x=document.getElementsByName("span");
{
var month=x = new Array();
month [01] = "January";
month [02] = "February";
month [03] = "March";
month [04] = "April";
month [05] = "May";
month [06] = "June";
month [07] = "July";
month [08] = "August";
month [09] = "September";
month [10] = "October";
month [11] = "November";
month [12] = "December";
for (i=01;i<x.length;i++)
{
document.write(x );
}
}
}
</script>
</head>
<body>
<table>
<thead>
<tr><th>Year</th><th>?</th><th>Forname(s)</th><th>Surname</th></tr>
</thead>
<tbody>
<tr><td>1840<span>02</span>03</td><td></td><td>Elizabeth</
td><td><a>ABBOTT</a></td></tr>
<tr><td>1800<span>03</span>03</td><td></td><td>Esther</td><td>ABBOTT</
td></tr>
<tr><td>1830<span>04</span>03</td><td></td><td>Franciscus</
td><td>ALEXANDER</td></tr>
<tr><td>1800<span>01</span>20</td><td></td><td>?</td><td>ALLEN</td></
tr>
</tbody>
</table>
</body>
</html>
So the first cell in the first row would appear "1840February03"
Any assitance would gladly be welcome, Thank you
Alan