Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

code glitch

I can't figure out why this code is making the page always say You MUST accept the Terms and Conditions. it's near the bottom but I can't figure out what's wrong. Any suggestions?

<SCRIPT Language="JavaScript">
      function  Verify()
            if (Data_Form.New_UserName.value == '')
                  alert('User Name is a required field.');
            else if (Data_Form.New_First_Name.value == '')
                  alert('First Name is a required field.');
            else if (Data_Form.New_Last_Name.value == '')
                  alert('Last Name is a required field.');
            if (Data_Form.New_Title.value == '')
                  alert('Title is a required field.');
            else if (Data_Form.New_LAN_AreaCode.value == '' || Data_Form.New_LAN_Phone1.value == '' || Data_Form.New_LAN_Phone2.value == '')
                  alert('LAN Phone is a required to be completely filled.');
            else if (Data_Form.New_SS_No1.value == '' || Data_Form.New_SS_No2.value == '' || Data_Form.New_SS_No3.value == '')
                  alert('Social Security # / FEderal Tax ID is required.');
            else if (Data_Form.New_DOB.value == '')
                  alert('Date of Birth is required.');
            else if (Data_Form.New_Password.value == '')
                  alert('Password is required.');
            else if (Data_Form.New_Password.value != Data_Form.Verify_Password.value)
                  alert('Your Passwords Dont Verify.');
                  Data_Form.New_Password.value = '';
                  Data_Form.Verify_Password.value = '';
            else if (Data_Form.New_Accept.value = '0')
                  alert('You MUST accept the Terms and Conditions.');
                  if (confirm('By clicking [OK] you are accepting and agreeing to all the terms and conditions of the Tremcor Agreement.'));
      function on_Accept_Click()
            if (Data_Form.Checkbox_Accept.checked)
                  Data_Form.New_Accept.value = '1';
                  Data_Form.New_Accept.value = '0';
1 Solution
use == not = for boolean test

else if (Data_Form.New_Accept.value == '0')
StrategicGnomerAuthor Commented:
ooohhhh, i knew it was something ridiculously simple.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now