Hi all,
I want to see the value of first 2 characters of variable ctlDuedate but there's seem to be something wrong with my substring statement because the program just run thru document.end without display the value to me.
if I remove line
str = ctlDuedate.substring(0,2);
and change write line to
document.write(ctlDuedate.value);
then it stop and show the value correctly, the value shown as 08/21/08.
Please help. Thanks in advance
I want to see the value of first 2 characters of variable ctlDuedate but there's seem to be something wrong with my substring statement because the program just run thru document.end without display the value to me.
Code:
function check_input()
{
var ctlDuedate = document.f1.newduedate;
var str = "";
str = ctlDuedate.substring(0,2);
document.write(str.value);
document.end();
str = ctlDuedate.substring(0,2);
and change write line to
document.write(ctlDuedate.value);
then it stop and show the value correctly, the value shown as 08/21/08.
Please help. Thanks in advance