DoctorGonzo
Programmer
Hi guys,
similar topics have been covered before, but none have helped me really.
I simply want to prompt user with "number of days", and whatever the user types in is captured. A date object on the field is then incremented with/by this number. No matter what I do I get "object does not support this property or method". Bah! I'm used to this message!
Anyway, can anyone please help me with this code?
Many thanks,
Gonzo
function ExtendTheDate(){
var dateday = prompt("Please enter number of days to increase expiry date by","")
if (dateday != null && dateday != "")
{
alert("This Will increase date object by " + dateday + " days!");
document.forms[0].DateToChange.setDate(document.forms[0].DateToChange.getDate()+ dateday);
}
similar topics have been covered before, but none have helped me really.
I simply want to prompt user with "number of days", and whatever the user types in is captured. A date object on the field is then incremented with/by this number. No matter what I do I get "object does not support this property or method". Bah! I'm used to this message!
Anyway, can anyone please help me with this code?
Many thanks,
Gonzo
function ExtendTheDate(){
var dateday = prompt("Please enter number of days to increase expiry date by","")
if (dateday != null && dateday != "")
{
alert("This Will increase date object by " + dateday + " days!");
document.forms[0].DateToChange.setDate(document.forms[0].DateToChange.getDate()+ dateday);
}