J
Jes
Hi
I have a problem with assigning values in a form. I have a date field
in MySql and when I load the form , I would like to spilt it up in 3
fields ie day, month and year. I created 3 fields in the form ie.
<td class="Input"><input name="BKYEAR" size=8 id="BKYEAR">
<td class="Input"><select name="BKMONTH" size=8 id="BKMONTH">
<td class="Input"><select name="BKDAY" size=8 id="BKDAY">
On loading the form I would like to create a function that reads the
date field and spilt them to these fields so that each filed display
the values correctly from the date.
function readdate() {
var today = new Date();
today = document.getElementById("txtBookingsBOOKINGDATE").value;
alert(today)
BKDAY = today.getDate();
}
On the last line , I am getting an the following error:
'Object doesn't support this property or method'
Why ?
Thanks
Jesmond
I have a problem with assigning values in a form. I have a date field
in MySql and when I load the form , I would like to spilt it up in 3
fields ie day, month and year. I created 3 fields in the form ie.
<td class="Input"><input name="BKYEAR" size=8 id="BKYEAR">
<td class="Input"><select name="BKMONTH" size=8 id="BKMONTH">
<td class="Input"><select name="BKDAY" size=8 id="BKDAY">
On loading the form I would like to create a function that reads the
date field and spilt them to these fields so that each filed display
the values correctly from the date.
function readdate() {
var today = new Date();
today = document.getElementById("txtBookingsBOOKINGDATE").value;
alert(today)
BKDAY = today.getDate();
}
On the last line , I am getting an the following error:
'Object doesn't support this property or method'
Why ?
Thanks
Jesmond