• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 490
  • Last Modified:

checkdate function giving undefined error

Hi!

I am calling the following javascript via the following two statements on an xsl page:

<td align="center">
            <input maxLength="8" name="startdt" size="8" onfocus="dosubmit=false;" onblur="dosubmit=checkDates();" value=""/>
           </td>
          <td align="center">
            <input maxLength="8" name="enddt" size="8" onfocus="dosubmit=false;" onblur="dosubmit=checkDates();" value=""/>
           </td>

I am getting the following error when I am leaving the start date field whether or not a value is entered:

startdt is undefined

Any ideas?

Chuck

 var dosubmit = true;

    function checkDates()
    {

          var sStartDate;
          var sEndDate;

           if (!checkDate(startdt)) return false;
           if (!checkDate(enddt)) return false;

          sStartDate = startdt.value;
          sEndDate = enddt.value;

           dtStartDate = ConvertStringToDate(startdt.value);
           dtEndDate = ConvertStringToDate(sEndDate);

           if (dtStartDate > dtEndDate)
           {
                alert('The end date (' + sEndDate + ') is earlier than the start date (' + sStartDate + ')');
                return false;
           }

           return true;

     }

     function ConvertStringToDate(sDate)
     {

          var sDateArray;
          var iMonth;
          var iDay;
          var iYear;

          if (sDate.indexOf('/') != -1)
           {
                sDateArray = sDate.split('/');
               iMonth = parseInt(sDateArray[0], 10);
               iDay = parseInt(sDateArray[1], 10);
               iYear = parseInt(sDateArray[2], 10);
           }

          return new Date(iYear, iMonth, iDay);

     }


   function checkDate(oDateElem, sDate)
   {


             var sDate = oDateElem.value;

             if (sDate.length < 1)
           {
                return true;
           }

           if (sDate.indexOf('/') != -1)
           {
                sDateArray = sDate.split('/');
                if (sDateArray.length != 3)
               {
                    alert('Invalid date (' + sDate + ').');
                    oDateElem.focus();
                    return false;
               }
                sMonth = sDateArray[0];
                sDay = sDateArray[1];
                sYear = sDateArray[2];
           }

           if (sYear.length == 1)
           {
                sYear = '200' + sYear;
           }
           if (sYear.length == 2)
           {
                sYear = '20' + sYear;
           }

           iDay = parseInt(sDay, 10);

           if (isNaN(iDay))
           {
               alert('Invalid date (' + sDate + ').');
               oDateElem.focus();
               return false;
           }

           iMonth = parseInt(sMonth, 10);
           if (isNaN(iMonth))
           {
               alert('Invalid date (' + sDate + ').');
               oDateElem.focus();
               return false;
           }

           iYear = parseInt(sYear, 10);
           if (isNaN(iYear))
           {
               alert('Invalid date (' + sDate + ').');
               oDateElem.focus();
               return false;
           }

           if (iYear < 1900 || iYear > 2078)
           {
               alert('Invalid date - year must be between 1900 and 2078 (' + sDate + ').');
               oDateElem.focus();
               return false;
           }


           if (iMonth > 12 || iMonth < 1)
           {
               alert('Invalid date - month must be between 1 and 12 (' + sDate + ').');
               oDateElem.focus();
               return false;
           }

           if ((iMonth == 1 || iMonth == 3 || iMonth == 5 || iMonth == 7 || iMonth == 8 || iMonth == 10 || iMonth == 12) && (iDay > 31 || iDay < 1))
           {
               alert('Invalid date - day must be between 1 and 31 (' + sDate + ').');
               oDateElem.focus();
               return false;
           }

           if ((iMonth == 4 || iMonth == 6 || iMonth == 9 || iMonth == 11) && (iDay > 30 || iDay < 1))
           {
               alert('Invalid date - day must be between 1 and 30 (' + sDate + ').');
               oDateElem.focus();
               return false;
           }

           if (iMonth == 2)
           {
                if (LeapYear(iYear) == true)
                {
                     if (iDay < 1 || iDay > 29)
                     {
                         alert('Invalid date - day must be between 1 and 29 (' + sDate + ').');
                         oDateElem.focus();
                         return false;
                     }
                }
                else
                {
                     if (iDay < 1 || iDay > 28)
                     {
                         alert('Invalid date - day must be between 1 and 28 (' + sDate + ').');
                         oDateElem.focus();
                         return false;
                     }
                }
           }

          oDateElem.value = iMonth + "/" + iDay + "/" + iYear;

           return true;
     }


     function LeapYear(iYear)
     {
          if (iYear % 100 == 0)
          {
               if (iYear % 400 == 0)
               {
                    return true;
               }
          }
          else
          {
               if ((iYear % 4) == 0)
               {
                    return true;
               }
          }
          return false;
     }
0
TrueBlue
Asked:
TrueBlue
  • 9
  • 8
  • 8
  • +2
2 Solutions
 
ho_alanCommented:
um...
1.u can use a form
<form name=fm1>
<td align="center">
           <input maxLength="8" name="startdt" size="8" onfocus="dosubmit=false;" onblur="dosubmit=checkDates();" value=""/>
          </td>
         <td align="center">
           <input maxLength="8" name="enddt" size="8" onfocus="dosubmit=false;" onblur="dosubmit=checkDates();" value=""/>
          </td>
</form>

then,  in the function
         sStartDate = document.fm1.startdt.value;
         sEndDate = document.fm1.enddt.value;
----------------------------------------------------------------------------------------
or

           <input maxLength="8" id="startdt" size="8" onfocus="dosubmit=false;" onblur="dosubmit=checkDates();" value=""/>
          </td>
         <td align="center">
           <input maxLength="8" id="enddt" size="8" onfocus="dosubmit=false;" onblur="dosubmit=checkDates();" value=""/>
          </td>

then,  in the function
         sStartDate = document.all.startdt.value;
         sEndDate = document.all.enddt.value;

hope this helps



0
 
ho_alanCommented:
because "startdt"  is the name  of the input field
but a JS variable
0
 
TrueBlueAuthor Commented:
Hi ho_alan!

I used your second method, but unfortunately I get the exact same error.

If I understood correctly, you wanted me to substitue this:
 sStartDate = startdt.value;
 sEndDate = enddt.value;

with this:

 sStartDate = document.all.startdt.value;
 sEndDate = document.all.enddt.value;
 
Any other ideas?

Chuck
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ho_alanCommented:
um...u should  change

all  "startdt" and "enddt"
to be "document.all.startdt" and "document.all.enddt"

eg.
   if (!checkDate(document.all.startdt)) return false;
          if (!checkDate(document.all.enddt)) return false;

         sStartDate = document.all.startdt.value;
         sEndDate = document.all.enddt.value;

hope this  helps
0
 
ho_alanCommented:
i have tried,should work  without error

<html>
<body>
<script>
var dosubmit = true;

   function checkDates()
   {

         var sStartDate= document.all.startdt;
         var sEndDate= document.all.enddt;

          if (!checkDate(sStartDate))  return false;
          if (!checkDate(sEndDate)) ; return false;


          dtStartDate = ConvertStringToDate(document.all.startdt.value);
          dtEndDate = ConvertStringToDate(sEndDate);

          if (dtStartDate > dtEndDate)
          {
               alert('The end date (' + sEndDate + ') is earlier than the start date (' + sStartDate + ')');
               return false;
          }

          return true;

    }

    function ConvertStringToDate(sDate)
    {

         var sDateArray;
         var iMonth;
         var iDay;
         var iYear;

         if (sDate.indexOf('/') != -1)
          {
               sDateArray = sDate.split('/');
              iMonth = parseInt(sDateArray[0], 10);
              iDay = parseInt(sDateArray[1], 10);
              iYear = parseInt(sDateArray[2], 10);
          }

         return new Date(iYear, iMonth, iDay);

    }


  function checkDate(oDateElem)
  {


            var sDate = oDateElem.value;

            if (sDate.length < 1)
          {
               return true;
          }

          if (sDate.indexOf('/') != -1)
          {
               sDateArray = sDate.split('/');
               if (sDateArray.length != 3)
              {
                   alert('Invalid date (' + sDate + ').');
                   oDateElem.focus();
                   return false;
              }
               sMonth = sDateArray[0];
               sDay = sDateArray[1];
               sYear = sDateArray[2];
          }

          if (sYear.length == 1)
          {
               sYear = '200' + sYear;
          }
          if (sYear.length == 2)
          {
               sYear = '20' + sYear;
          }

          iDay = parseInt(sDay, 10);

          if (isNaN(iDay))
          {
              alert('Invalid date (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          iMonth = parseInt(sMonth, 10);
          if (isNaN(iMonth))
          {
              alert('Invalid date (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          iYear = parseInt(sYear, 10);
          if (isNaN(iYear))
          {
              alert('Invalid date (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          if (iYear < 1900 || iYear > 2078)
          {
              alert('Invalid date - year must be between 1900 and 2078 (' + sDate + ').');
              oDateElem.focus();
              return false;
          }


          if (iMonth > 12 || iMonth < 1)
          {
              alert('Invalid date - month must be between 1 and 12 (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          if ((iMonth == 1 || iMonth == 3 || iMonth == 5 || iMonth == 7 || iMonth == 8 || iMonth == 10 || iMonth == 12) && (iDay > 31 || iDay < 1))
          {
              alert('Invalid date - day must be between 1 and 31 (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          if ((iMonth == 4 || iMonth == 6 || iMonth == 9 || iMonth == 11) && (iDay > 30 || iDay < 1))
          {
              alert('Invalid date - day must be between 1 and 30 (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          if (iMonth == 2)
          {
               if (LeapYear(iYear) == true)
               {
                    if (iDay < 1 || iDay > 29)
                    {
                        alert('Invalid date - day must be between 1 and 29 (' + sDate + ').');
                        oDateElem.focus();
                        return false;
                    }
               }
               else
               {
                    if (iDay < 1 || iDay > 28)
                    {
                        alert('Invalid date - day must be between 1 and 28 (' + sDate + ').');
                        oDateElem.focus();
                        return false;
                    }
               }
          }

         oDateElem.value = iMonth + "/" + iDay + "/" + iYear;

          return true;
    }


    function LeapYear(iYear)
    {
         if (iYear % 100 == 0)
         {
              if (iYear % 400 == 0)
              {
                   return true;
              }
         }
         else
         {
              if ((iYear % 4) == 0)
              {
                   return true;
              }
         }
         return false;
    }

</script>
<td align="center">
           <input maxLength="8" id="startdt" size="8" onfocus="dosubmit=false;" onblur="dosubmit=checkDates();" value=""/>
          </td>
         <td align="center">
           <input maxLength="8" id="enddt" size="8" onfocus="dosubmit=false;" onblur="dosubmit=checkDates();" value=""/>
          </td
</body>
</html>
0
 
ho_alanCommented:
no ";",i mistyped it
         if (!checkDate(sEndDate))  return false;

please tell if u still have problems  :-)
0
 
ho_alanCommented:
please wait
i am  making some changes for u

is that if user enters "1"
then it will be converted to "1/1/2000"?
0
 
ho_alanCommented:
ok, i got it
please wait for my final version
0
 
ho_alanCommented:
<html>
<body>
<script language=javascript>
var dosubmit = true;

   function checkDates()
   {

         var sStartDate= document.all.startdt;
         var sEndDate= document.all.enddt;

          if (!checkDate(sStartDate))  return false;
          if (!checkDate(sEndDate))  return false;


          dtStartDate = ConvertStringToDate(sStartDate.value);
          dtEndDate = ConvertStringToDate(sEndDate.value);

          if (dtStartDate > dtEndDate)
          {
               alert('The end date (' + sEndDate.value + ') is earlier than the start date (' + sStartDate.value + ')');
               return false;
          }

          return true;

    }

    function ConvertStringToDate(sDate)
    {

         var sDateArray;
         var iMonth;
         var iDay;
         var iYear;

         if (sDate.indexOf('/') != -1)
          {
               sDateArray = sDate.split('/');
              iMonth = parseInt(sDateArray[0],10);
              iDay = parseInt(sDateArray[1],10);
              iYear = parseInt(sDateArray[2],10);
          }

         return new Date(iYear, iMonth, iDay);

    }


  function checkDate(oDateElem)
  {

           var sDate = oDateElem.value;
         if (sDate == "") return true;
      
           if (sDate.length < 1)
      
          {
               return true;
          }

          if (sDate.indexOf('/') != -1)
          {
               sDateArray = sDate.split('/');
               sMonth = sDateArray[0];
               sDay = sDateArray[1];
               sYear = sDateArray[2];
          }
        else
        {
                alert('Invalid date (' + sDate + ').');
                oDateElem.focus();
                return false;
        }
         


          if (sYear.length == 1)
          {
               sYear = '200' + sYear;
          }
          if (sYear.length == 2)
          {
               sYear = '20' + sYear;
          }

          iDay = parseInt(sDay, 10);

          if (isNaN(iDay))
          {
              alert('Invalid date (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          iMonth = parseInt(sMonth, 10);
          if (isNaN(iMonth))
          {
              alert('Invalid date (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          iYear = parseInt(sYear, 10);
          if (isNaN(iYear))
          {
              alert('Invalid date (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          if (iYear < 1900 || iYear > 2078)
          {
              alert('Invalid date - year must be between 1900 and 2078 (' + sDate + ').');
              oDateElem.focus();
              return false;
          }


          if (iMonth > 12 || iMonth < 1)
          {
              alert('Invalid date - month must be between 1 and 12 (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          if ((iMonth == 1 || iMonth == 3 || iMonth == 5 || iMonth == 7 || iMonth == 8 || iMonth == 10 || iMonth == 12) && (iDay > 31 || iDay < 1))
          {
              alert('Invalid date - day must be between 1 and 31 (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          if ((iMonth == 4 || iMonth == 6 || iMonth == 9 || iMonth == 11) && (iDay > 30 || iDay < 1))
          {
              alert('Invalid date - day must be between 1 and 30 (' + sDate + ').');
              oDateElem.focus();
              return false;
          }

          if (iMonth == 2)
          {
               if (LeapYear(iYear) == true)
               {
                    if (iDay < 1 || iDay > 29)
                    {
                        alert('Invalid date - day must be between 1 and 29 (' + sDate + ').');
                        oDateElem.focus();
                        return false;
                    }
               }
               else
               {
                    if (iDay < 1 || iDay > 28)
                    {
                        alert('Invalid date - day must be between 1 and 28 (' + sDate + ').');
                        oDateElem.focus();
                        return false;
                    }
               }
          }

         oDateElem.value = iMonth + "/" + iDay + "/" + iYear;

          return true;
    }


    function LeapYear(iYear)
    {
         if (iYear % 100 == 0)
         {
              if (iYear % 400 == 0)
              {
                   return true;
              }
         }
         else
         {
              if ((iYear % 4) == 0)
              {
                   return true;
              }
         }
         return false;
    }

</script>
<td align="center">start
           <input maxLength="8" id="startdt" size="8" onfocus="dosubmit=false;" onblur="dosubmit=checkDates();" value=""/>
          </td>
         <td align="center">end
           <input maxLength="8" id="enddt" size="8" onfocus="dosubmit=false;" onblur="dosubmit=checkDates();" value=""/>
          </td>
</body>
</html>
0
 
NetGrooveCommented:
How about this:


<html>
<head>
<script>

 var dosubmit = true;

    function checkDates(theField)
    {
          var theForm = theField.form;
          var sStartDate;
          var sEndDate;

           if (!checkDate(theForm.startdt)) return false;
           if (!checkDate(theForm.enddt)) return false;

          sStartDate = theForm.startdt.value;
          sEndDate = theForm.enddt.value;

           dtStartDate = ConvertStringToDate(theForm.startdt.value);
           dtEndDate = ConvertStringToDate(sEndDate);

           if (dtStartDate > dtEndDate)
           {
                alert('The end date (' + sEndDate + ') is earlier than the start date (' + sStartDate + ')');
                return false;
           }

           return true;

     }

     function ConvertStringToDate(sDate)  {

          var sDateArray;
          var iMonth;
          var iDay;
          var iYear;

          if (sDate.indexOf('/') != -1)
           {
                sDateArray = sDate.split('/');
               iMonth = parseInt(sDateArray[0], 10);
               iDay = parseInt(sDateArray[1], 10);
               iYear = parseInt(sDateArray[2], 10);
           }

          return new Date(iYear, iMonth, iDay);

     }


   function checkDate(oDateElem)  {

     var sDate = oDateElem.value.split("/");
     if (sDate.length != 3) {
        return false;
     }
     iDate = new Date(oDateElem.value);
     iMonth = iDate.getMonth()+1;
     iDay = iDate.getDate();
     iYear = iDate.getFullYear();
     if(sDate[0]!=iMonth || sDate[1]!=iDay || sDate[2]!=iYear){
       alert('Invalid date.');
       oDateElem.select();
       oDateElem.focus();
       return false;
     }
     return true;
   }


</script>
</head>
<body>
<form>
<table><tr>
<td align="center">
            <input maxLength="10" name="startdt" size="10" onfocus="dosubmit=false;" onblur="dosubmit=checkDates(this);" value=""/>
           </td>
          <td align="center">
            <input maxLength="10" name="enddt" size="10" onfocus="dosubmit=false;" onblur="dosubmit=checkDates(this);" value=""/>
           </td>
</tr></table>
</form>
</body>
</html>



0
 
ofekeCommented:
The problem might be that your function is located before the input field is created?

If so - try moving the function that deals with "strtdt" to the end of your code..
0
 
Michel PlungjanIT ExpertCommented:
Please note that NetGrooves code will work in more browsers since it is passing the form/form field instead of usin IE only document.all
0
 
Michel PlungjanIT ExpertCommented:
Ofeke: You can place the function anywhere as long as it is not CALLED before the form exists
0
 
ofekeCommented:
Nope - some browsers perform "precheck" for objects. even IE do that in some cases.

Not only when you call a function - also when you cause an event, eval object etc etc
0
 
Michel PlungjanIT ExpertCommented:
Not in my universe....
0
 
TrueBlueAuthor Commented:
Hi Ho_Alan!

I get the following error with the new version whether I enter a value or not.

Length is null or not an object

Chuck
0
 
TrueBlueAuthor Commented:
Hi Netgroove!

I get the same error length is null or not an object with your version as well.

Any ideas?

Chuck
0
 
TrueBlueAuthor Commented:
Hi Netgroove!

I was wrong I get value is null or not an object from your suggestion.

Thank you in advance.

Chuck
0
 
NetGrooveCommented:
Check this:

<html>
<head>
<script>
 var dosubmit = false;

    function checkDates(theField)
    {
          var theForm = theField.form;
          var sStartDate;
          var sEndDate;

           if (!checkDate(theForm.startdt)) return false;
           if (!checkDate(theForm.enddt)) return false;

          sStartDate = theForm.startdt.value;
          sEndDate = theForm.enddt.value;

           dtStartDate = ConvertStringToDate(theForm.startdt.value);
           dtEndDate = ConvertStringToDate(sEndDate);

           if (dtStartDate > dtEndDate)
           {
                alert('The end date (' + sEndDate + ') is earlier than the start date (' + sStartDate + ')');
                return false;
           }

           return true;

     }

     function ConvertStringToDate(sDate)  {

          var sDateArray;
          var iMonth;
          var iDay;
          var iYear;

          if (sDate.indexOf('/') != -1)
           {
                sDateArray = sDate.split('/');
               iMonth = parseInt(sDateArray[0], 10);
               iDay = parseInt(sDateArray[1], 10);
               iYear = parseInt(sDateArray[2], 10);
           }

          return new Date(iYear, iMonth, iDay);

     }


   function checkDate(oDateElem)  {

     var sDate = oDateElem.value.split("/");
     if (sDate.length != 3) {
        if(oDateElem.value>""){
          alert("Inavlid Date format: "+oDateElem.value+"\nEnter Date in this format: MM/DD/YYYY");
          oDateElem.select();
          oDateElem.focus();
        }
        return false;
     }
     iDate = new Date(oDateElem.value);
     iMonth = iDate.getMonth()+1;
     iDay = iDate.getDate();
     iYear = iDate.getFullYear();
     if(sDate[0]!=iMonth || sDate[1]!=iDay || sDate[2]!=iYear){
       alert('Invalid date.');
       oDateElem.select();
       oDateElem.focus();
       return false;
     }
     return true;
   }
</script>
</head>
<body>
<form onSubmit="return dosubmit">
<table><tr>
<td align="center">
            <input maxLength="10" name="startdt" size="10" onfocus="dosubmit=false;" onblur="dosubmit=checkDates(this);" value=""/>
           </td>
          <td align="center">
            <input maxLength="10" name="enddt" size="10" onfocus="dosubmit=false;" onblur="dosubmit=checkDates(this);" value=""/>
           </td>
</tr></table>
<input type=submit>
</form>
</body>
</html>


Also is your error message not comming from my example.
Some additional code contains some typo.
Could you post your complete code for debugging?

0
 
TrueBlueAuthor Commented:
Hi NetGroove!

I am sure the error is coming from this function because if I substitute:

       <input maxLength="10" name="enddt" size="10" onfocus="dosubmit=false;" onblur="dosubmit=checkDates(this);" value=""/>

with

       <input maxLength="10" name="enddt" size="10" value=""/>

I get no errors.

Here is my submission button in xslt:

  <xsl:if test="$aspemail != 'true'">
            <input type="submit" NAME="sendChanges" VALUE="Only Press Once to Send Changes">
              <xsl:attribute name="onclick"><![CDATA[ if(doSubmit) { document.form1.submit(); } ]]></xsl:attribute>
            </input>
          </xsl:if>

Here is my form code in asp:

<HTML>
  <head>
    <title>Call List Table</title>
   
     <script language="Javascript" type="text/javascript" src="datemask.js"></script>

  </head>
<body>
 <form name="form1" onsubmit="if(doSubmit) { return true; } else { return false; }" ACTION="calllist.asp" METHOD="POST">
   <input type="hidden" id="hiddeninput" value="">
   <input type="hidden" name="itemToDelete" value="">
   <input type="hidden" name=a value="<%=Request("a")%>">

Would I need to replace the phrase "theform" in your code with "form1" since that is what my form is named?

I did not include the opening / closing script tags when I copied this code to the datemask.js file.

Chuck
0
 
NetGrooveCommented:
The var dosubmit has to be global defined.
And the spelling has to be always the same, not doSubmit

You get an error for this event:
  onfocus="dosubmit=false;"

Because dosubmit is not previously defined.

In xslt you even name it doSubmit

Change all vars to same name.

0
 
NetGrooveCommented:
Also the same for theForm. You can not rename it to theform or form1.
My proposal get the form reference trough the input field reference passed by reference to itself: this

0
 
TrueBlueAuthor Commented:
Hi NetGroove:

I did a search and replace through my asp, xsl and js pages. The variable is now doSubmit everywhere, but I am still get the same error value is null or not an object.

Is there a way to stop the script at certain points to see where the value problem is?

Similiar to response.write sStartdt
               response.end

Thank you for you help.

Chuck
0
 
NetGrooveCommented:
where is onSubmit origianly defined and initialized?
I supos it has to be defined in datemask.js

If it is nowhere initialized, then you get an error for compare in "if(doSubmit)"

0
 
TrueBlueAuthor Commented:
Hi NetGroove!

I have another javascript function that checks the telephone field's format.
It is initialized I believe in there.

var doSubmit = true;

It is called by a similiar statement on the xsl page as well.

<INPUT maxLength="12" name="priphone" size="12" onfocus="doSubmit=false;"
             onblur="checkPhone(this);" onkeyup="phoneMask(this);" onkeydown="phoneMask(this);"
             value=""/>

Chuck


0
 
ho_alanCommented:
maybe u can add a function to check the invalid input first
because if the user doesn't enter properly
eg. he enters "1", then focus on the box
error will occur
0
 
NetGrooveCommented:
init value should be: false

like:
var doSubmit = false;

Also it is possible to change your submit button to this:

  <xsl:if test="$aspemail != 'true'">
            <input type="submit" NAME="sendChanges" VALUE="Send Changes">
              <xsl:attribute name="onclick"><![CDATA[ if(doSubmit) {doSubmit=false; this.form.submit(); } ]]></xsl:attribute>
            </input>
          </xsl:if>

This button submits now the form only if changes have been approved after the last submit.

0
 
NetGrooveCommented:
Please do not give grading B for such long running support.

Anyway, thanks for the points.
You do not know, but eperts get more points when you grade A.
If you want to do me a favor, then let correct your grading by posting a request in CS topic area:
http://www.experts-exchange.com/Community_Support/

Cheers,
NetGroove

0
 
TrueBlueAuthor Commented:
Hi NetGroove!

I appreciate your help on this issue, but I was never able to get it to work.

So I just closed the question.

Chuck
0
 
NetGrooveCommented:
Sorry for that.
Ok, hope next time to be of more help.

See you,
NetGroove

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 9
  • 8
  • 8
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now