Hi friends,
I have a javascript code which was working well with my plain html properly, but now the issue is ever since i embeded that script in my jsp page(im working with struts) it stopped working. I cant figure out what the problem might be really.What happens, when i click on submit the javascript doesnt fire up(it used to fire previously.) Please help me regarding this problem.
the javascript code goes--->

reqscript.js
Code:
function setdate1(form) {
var now = new Date();
var date = now.getDate();
var month = now.getMonth();
var year = now.getFullYear();
//var year = now.getYear();
newyear = year
newmonth = month+1;
var date1 = date+"/"+newmonth+"/"+newyear;
document.arch.date.value=date1;
document.arch.approved_by.value="Neeta Asnani";
}

function everything(form) {
isdate(form)
isbrief(form)
isdigit(form)
isperiod(form)
isproposed(form)
isapprove(form)
allblanks(form)
}

function allblanks(form) 
{
 if(isdate(form) && isbrief(form) && isperiod(form) && isproposed(form)  && isapprove(form) && isdigit(form)) 
 {
   form.submit() 
 }
 if(isdate(form) == false || isbrief(form) == false ||       
   isperiod(form) == false || isproposed(form) == false || isapprove(form) == false || isdigit(form) == false) 
 {
  compose(form)
 }
}

function compose(form) {
  var text = "You forgot to fill in correctly:"	
  if(isdate(form) == false) {
   text += "\nDATE"
  }
   
  if (isbrief(form) == false) {
   text += "\nBRIEF FOR CREATIVE"
  }
  if (isperiod(form) == false) {
   text += "\nPERIOD OF PUBLICITY"
  }
  if (isproposed(form) == false) {
   text += "\nPROPOSED BY"
  }
  if (isapprove(form) == false) {
   text += "\nAPPROVED BY"
  }
  if (isdigit(form) == false) {
   text += "\nAMOUNT"
  }


alert(text)
}

function isdate(form)
{
  if (form.date.value == "") {
  return false
  }
  else {
  var len = form.date.value.length
  for (var k = 0; k < len; k++)
  {
    var c = form.date.value.substring(k, k+1);
    if(c != "/") 
    {
     if(isNaN(parseInt(c))) 
     {
      return false
     }
    } 
  }

   if(len > 10) {return false}
   if(len < 8) {return false}
   if(len == 10) 
   {
    var n2 =form.date.value.substring(6,10)
    if (n2 != newyear) {return false}
   }

   if(len == 9) 
   {
    var n3 =form.date.value.substring(5,9)
    if (n3 != newyear) {return false}
   }
   if (len == 8)
   { var n3 = form.date.value.substring(4,8)
     if (n3 != newyear) {return false}
   }
   return true
  }
}

function isbrief(form)
{
 if (form.brief1.value == "") {
  return false
 }
 else {
  return true
 }
}
function isperiod(form)
{
 if (form.period.value == "") {
  return false 
 }
 else {
  return true
 }
}
function isproposed(form)
{
   if (form.proposed_by.value == "") {
    return false
   }
   else {
   return true
   }
}

function isapprove(form)
{
 if (form.approved_by.value == "") {
   return false 
 }
 else {
   return true
 }
}

function isdigit(form)
{
 if(form.amount.value == "")
 {
 return false;
 }
 else
 {
  var len = form.amount.value.length
  var test = ""+form.amount.value;
  for (var k = 0; k < len; k++)
  {
    var ch = test.substring(k, k+1);
    if(ch != ".") 
    {
     if(isNaN(parseFloat(ch))) 
     {
      return false
     }
    } 
  }
  return true
 }
}
and my jsp page is--->This is not the complete code.

HTML Code:
<SCRIPT LANGUAGE="JavaScript" SRC="reqscript1.js"></SCRIPT> <html:form action="/ExpenReqAction" name="expenreqForm" type="publicity.ExpenReqForm" method="post" onsubmit="return everything(this);">

<html:submit value="Submit" property="thesubmit"></html:submit>
    <html:reset value="Reset" property="reset"></html:reset>
this below was the plain html code-->
    <!-- <input type="button" name="thesubmit" value="Submit" onClick="everything(this.form)">
     <input type="reset" name="reset" value="Reset">
     -->
waiting in anticiaption.
regards,
ajos777