Atchett
Programmer
- Dec 7, 2000
- 35
Hi all,
I am trying to collect a date of birth from a form and then enter it into a database.
The problem that I am having is...
The 3 parts of the dob are in seperate drop down lists (not my favorite but it's not my choice!). I need to join the seperate parts together and then enter this into the db via another page. I am using this function to join the parts (which seems to work) :-
function getDateOfBirth()
{
DateOfBirthArr = new Array()
DateOfBirthArr[0] = dob_d.value;
DateOfBirthArr[1] = dob_m.value;
DateOfBirthArr[2] = dob_y.value;
DateOfBirth = DateOfBirthArr.join("-"
}
but I cannot seem to get the resulting dob to pass through to the next page.
I have tried <input type="hidden" value="javascript:getDateOfBirth()" name="DateOfBirth">
but it just comes through with javascript:getDateOfBirth() on the next page?
Does anyone have any ideas?
Many thanks in advance.
I am trying to collect a date of birth from a form and then enter it into a database.
The problem that I am having is...
The 3 parts of the dob are in seperate drop down lists (not my favorite but it's not my choice!). I need to join the seperate parts together and then enter this into the db via another page. I am using this function to join the parts (which seems to work) :-
function getDateOfBirth()
{
DateOfBirthArr = new Array()
DateOfBirthArr[0] = dob_d.value;
DateOfBirthArr[1] = dob_m.value;
DateOfBirthArr[2] = dob_y.value;
DateOfBirth = DateOfBirthArr.join("-"
}
but I cannot seem to get the resulting dob to pass through to the next page.
I have tried <input type="hidden" value="javascript:getDateOfBirth()" name="DateOfBirth">
but it just comes through with javascript:getDateOfBirth() on the next page?
Does anyone have any ideas?
Many thanks in advance.