Hi all,
I have a piece of script which for some reasons is not firing up, herez the script,
[CODE=javascript]
function everything(form )
{
var errors=0;
if(!isdate(form ))
errors++;
if(!isdate2(for m))
errors++;
if(errors==0)
return true;
else
{
compose(form);
return false;
}
}
function compose(form)
{
var text= "You forgot to fill in correctly:"
if(isdate(form) ==false)
{
text += "\nDate"
}
alert(text)
}
function isdate(form)
{
if(expenqryForm .from_Date.valu e == "")
{
return false
}
else
{
return true
}
}
function isdate2(form)
{
if(expenqryForm .to_Date.value == "")
{
return false
}
else
{
return true
}
}
[/CODE]
And here is my view source page--->
[HTML]<SCRIPT LANGUAGE="JavaS cript" SRC="ipubscript 1.js"></SCRIPT>[/HTML]
[HTML]<input type="text" name="from_Date " maxlength="8" size="8" value="" readonly="reado nly">[/HTML]
[HTML] <input type="text" name="to_Date" maxlength="8" size="8" value="" readonly="reado nly">[/HTML]
[HTML]<form name="expenqryF orm" method="post" action="/publicity/ExpenQryAction. do" onsubmit="retur n everything(this );">[/HTML]
Why is this script failing?.
Help appreciated :)
regards,
ajos
I have a piece of script which for some reasons is not firing up, herez the script,
[CODE=javascript]
function everything(form )
{
var errors=0;
if(!isdate(form ))
errors++;
if(!isdate2(for m))
errors++;
if(errors==0)
return true;
else
{
compose(form);
return false;
}
}
function compose(form)
{
var text= "You forgot to fill in correctly:"
if(isdate(form) ==false)
{
text += "\nDate"
}
alert(text)
}
function isdate(form)
{
if(expenqryForm .from_Date.valu e == "")
{
return false
}
else
{
return true
}
}
function isdate2(form)
{
if(expenqryForm .to_Date.value == "")
{
return false
}
else
{
return true
}
}
[/CODE]
And here is my view source page--->
[HTML]<SCRIPT LANGUAGE="JavaS cript" SRC="ipubscript 1.js"></SCRIPT>[/HTML]
[HTML]<input type="text" name="from_Date " maxlength="8" size="8" value="" readonly="reado nly">[/HTML]
[HTML] <input type="text" name="to_Date" maxlength="8" size="8" value="" readonly="reado nly">[/HTML]
[HTML]<form name="expenqryF orm" method="post" action="/publicity/ExpenQryAction. do" onsubmit="retur n everything(this );">[/HTML]
Why is this script failing?.
Help appreciated :)
regards,
ajos
Comment