0 Replies Latest reply on Oct 12, 2006 1:22 PM by hutch-diggens

    Form Validation....

    hutch-diggens Level 1
      hi (again), I finally found a tutorial on how to get a form with checkboxes to work--but, I'm trying to make it where all the feilds have to be filled out before you can submit it. I just don't know what to put in this area.

      here is the code--the problem is down at the bottom---

      mc=this;
      tfA=["company", "contact", "address", "city", "state", "zip", "phone", "email", "addinfo"];
      cbA=["individual", "group", "medicare", "prescription", "life", "annuities", "longterm"];
      submit_btn.onPress=function(){
      lv=new LoadVars();
      for(var i=0;i<tfA.length;i++){
      lv[tfA ]=mc[tfA].text;
      }
      for(var j=0;j<cbA.length;j++){
      lv[cbA[j]]=mc[cbA[j]].selected;
      }
      lv.sendAndLoad("email_request1.php",lv,"POST");
      }

      submit_btn.onRelease = function(){
      //I just don't know what to put after the if statment, I tried just the instance
      names-no luck.
      if ( ""){
      _root.gotoAndPlay("error");
      } else {
      _root.gotoAndPlay("correct");
      }
      }

      any suggestions?

      thanks,
      hutch