title: TypeError: document.getElementById(...) is null, in RSForms
body: <p>TypeError: document.getElementById(...) is null , when i click to form for continue this error will generate , any one please tell me how to fix this error.</p>
  
  <p>when i click to continue button , button call fnction submitform </p>
  
  <pre><code>&lt;script type="text/javascript"&gt; 
  
      function submitForm( )
      {  
  
          var form = document.paywayForm; 
          var errorString = "";
          var recurringURL = "https://www.payway.com.au/SignUp?ClientNumber=Q12882&amp;&amp;merchant_id=23660327&amp;FirstPaymentDate=&amp;CustomerNumber=&amp;returnURL=&amp;AddressRequired=true&amp;PlanName=";
          // NOTE: THIS USES A TEST MERCHANT!!
          var netURL = "https://www.payway.com.au/MakePayment?BillerCode=128827&amp;merchant_id=23660327&amp;payment_amount=";
              if( document.getElementById("RecurringRadio").checked == true )
          {
              if( document.getElementById("frequency1").value == null || document.getElementById("frequency1").value == "" )
              {
                  errorString = errorString + " payment frequency";
              }
              if( document.getElementById("SelectAmount1").value == null || document.getElementById("SelectAmount1").value == "" )
              {
                  errorString = errorString + " payment amount";
              }
              if( errorString == "" )
              {
                  document.location = recurringURL + document.getElementById("frequency1").value + document.getElementById("SelectAmount1").value +
                                      "&amp;Firstname=" + document.getElementById("OneOffAmount1").value;
              }
          }
  
          else if( document.getElementById("OneOffRadio").checked == true )
          {
              if( document.getElementById("OneOffAmount1").value == null || document.getElementById("OneOffAmount1").value == "" )
              {
                  errorString = errorString + "payment amount &amp;nbsp; &amp;nbsp;";
              }
              if( document.getElementById("Firstname").value == null || document.getElementById("Firstname").value == "" )
              {
                  errorString = errorString + "name &amp;nbsp; &amp;nbsp;";
              }
              if( document.getElementById("Surname").value == null || document.getElementById("Surname").value == "" )
              {
                  errorString = errorString + "surname &amp;nbsp; &amp;nbsp;";
              }
              if( document.getElementById("Address").value == null || document.getElementById("Address").value == "" )
              {
                  errorString = errorString + "address &amp;nbsp; &amp;nbsp;";
              }
  
              if( document.getElementById("Suburb").value == null || document.getElementById("Suburb").value == "" )
              {
                  errorString = errorString + "suburb &amp;nbsp; &amp;nbsp;";
              }
              if( document.getElementById("Postcode").value == null || document.getElementById("Postcode").value == "" )
              {
                  errorString = errorString + "postcode &amp;nbsp; &amp;nbsp;";
              }
              if( errorString == "" )
              {    
  
                   var newredirect = netURL + document.getElementById("OneOffAmount1").value +
  "&amp;information_fields=Direct_Funds,Title,Firstname,Surname,Address,Suburb,Postcode,State,Country,Phone,Mobile,Email,Bmail,PAWS&amp;payment_reference=00041234" + 
                                      "&amp;Direct_Funds=" + document.getElementById("Direct_Funds").value + 
                                      "&amp;Title=" + document.getElementById("Title").value + 
                                      "&amp;Firstname=" + document.getElementById("Firstname").value + 
                                      "&amp;Surname=" + document.getElementById("Surname").value + 
                                      "&amp;Address=" + document.getElementById("Address").value +
                                      "&amp;Suburb=" + document.getElementById("Suburb").value +
                                      "&amp;Postcode=" + document.getElementById("Postcode").value +
                                      "&amp;State=" + document.getElementById("State").value +
                                      "&amp;Country=" + document.getElementById("Country").value +
                                      "&amp;Phone=" + document.getElementById("Phone").value +
                                      "&amp;Mobile=" + document.getElementById("Mobile").value +
                                      "&amp;Email=" + document.getElementById("Email").value +
                                      "&amp;Bmail=" + document.getElementById("Bmail").value + 
                                      "&amp;PAWS=" + document.getElementById("PAWS").value;
                                //   alert(newredirect);
                                   document.paywayForm.submit();
                  /* document.location.href = newredirect;*/
              }
          }
          else
          {   
              errorString = errorString + "You must select a donation type&lt;br/&gt;";
          }
  
          if( errorString != "" )
          {   
              //alert(errorString);
              var errorEl = document.getElementById("Error");
              errorEl.innerHTML = "&lt;b&gt;The following fields must be completed: &lt;/b&gt;&lt;br/&gt; " + errorString + "";
              //alert(errorEl.innerHTML);
          }
      }
  
  
  &lt;/script&gt;
  </code></pre>