hi again
i am trying to create a date of birth from day,month,year variables. I cant get it working
all i get is unknown runtime error in ie and month is null in firefox!
ta
<p> </p>
i am trying to create a date of birth from day,month,year variables. I cant get it working
Code:
<head>
<script type="text/javascript">
function dobone() {
var day = document.getElementById('day').value ;
var mth = document.getElementById('month').value;
var year = document.getElementById('YY');
var birth = day + "-" + mth + "-" + year;
document.getElementById("dob").innerHTML = birth;
return true}
</script>
</head>
<body>
<p>Thank you.</p>
<p> </p>
<p>I need to take some personal details now ;</p>
<form id="form1" name="form1" method="POST" action="/site-test/personal.php?">
<p>Title
<input type="text" name="title" id="title" />
</p>
<p>firstname
<input type="text" name="firstname" id="firstname" />
</p>
<p>lastname
<input type="text" name="surname" id="surname" />
</p>
<p>date of birthday
<select name="day" id="day">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
<select name="month" id="month">
<option value="1" selected="selected">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<select name="YY" id="YY">
<option value="99">1999</option>
....
<option value="02">1902</option>
<option value="01">1901</option>
<option value="00" selected="selected">1900</option>
</select>
</p>
<input type="text" id="dob" name="dob" />
<p>continue
<input type="button" name="SubmitPers1" id="SubmitPers1" onClick="return dobone()" value="" />
</p>
<input type="hidden" name="MM_insert" value="form1" />
</form>
all i get is unknown runtime error in ie and month is null in firefox!
ta
<p> </p>