title: Call javascript function from another js file
body: <p>I have a javascript file that reads the input from textbox inputs in MVC/AngularJS. The method looks like the following:</p>
  
  <pre><code> $scope.Clients_CW = {
                  ....
              }
  
  function sendForm(data)
  {
     $scope.Clients_CW = data; 
     var submitData = registrationService.SaveFormData($scope.Clients_CW);}
  </code></pre>
  
  <p>I'm using the jQuery wizard with next, previous and finish buttons. This is in a different javascript file to the code above. My finish button looks like the following:</p>
  
  <pre><code>$($this.buttons.finish).click(function() {
          if(!$(this).hasClass('buttonDisabled')){
              if ($.isFunction($this.options.onFinish))
              {
                  var context = { fromStep: $this.curStepIdx + 1 };
                  if (!$this.options.onFinish.call(this, $($this.steps), context))
                  {
                      return false;
                  }
              }
              else {
                  var frm = $this.target.parents('form');
                  if (frm &amp;&amp; frm.length)
                  {
                      alert($scope.Clients_CW);
                      frm.submit();
                  }
              }
          }
          return false;
      });
  </code></pre>
  
  <p>My question and problem is... how do I pass through the $scope.Clients_CW data to the finish button method or how do I call the <code>sendForm(data)</code> method and it's parameter in the finish button method? </p>