29 Replies Latest reply: May 4, 2012 5:56 AM by Jonathan Fortis RSS

    javascript alert not working, HELP!

    Jonathan Fortis Community Member

      I have a check box that needs to be tick, if not the javascript kicks in before the page is sent to a new page

       

      here is the code

       

      <script type="text/javascript">

      function validate(form) {

      if (!document.AdminDownloads.elease.checked)

      { alert("By ticking this box you agree that you have clearly read this document according to our terms and conditions and agree to digitally sign the document.");

      return false; }

      return true;

      }

      </script>

       

       

      here is the form

      <form name="AdminDownloads" method="post" onsubmit="return validateForm()" action="">

       

      <input type="checkbox" name="elease" id="elease" />

       

      <a href="eLease.php?recordID=<?php echo $row_Recordset1['userid']; ?>"><input type="image" src="../images/smalldownload.png" width="35" height="35" alt="download" value="submit"/></a>

       

                    </form>

       

      can anyone see what i am doing wrong

       

      thanks in advance

      Jon