title: Uncaught ReferenceError: Type is not defined in sp.runtime.js
body: <p>I am trying to use the taxonomy Picker example from Office PnP.</p>
  
  <p>I just want to bind one field to one managed metadata term.</p>
  
  <p>The errors I got are here:
  <a href="http://screencast.com/t/nOaTusUH4V" rel="noreferrer">http://screencast.com/t/nOaTusUH4V</a></p>
  
  <p>The code I have is:</p>
  
  <pre><code>&lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;Learning bootstrap&lt;/title&gt;    
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;   
  
      &lt;link href="../Content/bootstrap.min.css" rel="stylesheet" /&gt; 
      &lt;link href="../Content/bootstrap-theme.min.css" rel="stylesheet" /&gt;
      &lt;link rel="Stylesheet" type="text/css" href="../Content/taxonomypickercontrol.css" /&gt;
      &lt;script src="../Scripts/jquery-2.1.1.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/_layouts/15/sp.runtime.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/_layouts/15/sp.js"&gt;&lt;/script&gt;
  
      &lt;script src="../Scripts/app.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="../Scripts/taxonomypickercontrol.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  
  body&gt;
      &lt;div id="divSPChrome"&gt;&lt;/div&gt;
      &lt;div class="container"&gt;      
          &lt;div class="row"&gt;
              &lt;div class="col-md-8"&gt;
                  &lt;h2&gt;Create project site&lt;/h2&gt;
                  &lt;form class="form-horizontal" role="form"&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="inputEmail3" class="col-sm-2 control-label"&gt;Project name&lt;/label&gt;
                          &lt;div class="col-sm-10"&gt;
                              &lt;input type="text" class="form-control" id="inputEmail3" placeholder="Project name"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label for="inputPassword3" class="col-sm-2 control-label"&gt;Domain&lt;/label&gt;
                          &lt;div class="col-sm-10"&gt;
                              &lt;input type="text" class="form-control" id="inputPassword3" placeholder="Domain"&gt;
                              &lt;div class="ms-core-form-line" style="margin-bottom: 0px;"&gt;
                                 &lt;input type="hidden" id="taxPickerContinent" /&gt;
  
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  </code></pre>
  
  <p>As you can see I have the hidden field.
  And my App.js file is:</p>
  
  <pre><code>// variable used for cross site CSOM calls
  var context;
  // variable to hold index of intialized taxPicker controls
  var taxPickerIndex = {};
  
  //Wait for the page to load
  $(document).ready(function () {
  
      //Get the URI decoded SharePoint site url from the SPHostUrl parameter.
      var spHostUrl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
      var appWebUrl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
      var spLanguage = decodeURIComponent(getQueryStringParameter('SPLanguage'));
  
      //Build absolute path to the layouts root with the spHostUrl
      var layoutsRoot = spHostUrl + '/_layouts/15/';
  
      //load all appropriate scripts for the page to function
      $.getScript(layoutsRoot + 'SP.Runtime.js',
          function () {
              $.getScript(layoutsRoot + 'SP.js',
                  function () {
                      //Load the SP.UI.Controls.js file to render the App Chrome
                      $.getScript(layoutsRoot + 'SP.UI.Controls.js', renderSPChrome);
  
                      //load scripts for cross site calls (needed to use the people picker control in an IFrame)
                      $.getScript(layoutsRoot + 'SP.RequestExecutor.js', function () {
                          context = new SP.ClientContext(appWebUrl);
                          var factory = new SP.ProxyWebRequestExecutorFactory(appWebUrl);
                          context.set_webRequestExecutorFactory(factory);
                      });
  
                      //load scripts for calling taxonomy APIs
                      $.getScript(layoutsRoot + 'init.js',
                          function () {
                              $.getScript(layoutsRoot + 'sp.taxonomy.js',
                                  function () {
                                      //bind the taxonomy picker to the default keywords termset
                                      //$('#taxPickerKeywords').taxpicker({ isMulti: true, allowFillIn: true, useKeywords: true }, context);
  
                                      $('#taxPickerContinent').taxpicker({ isMulti: false, allowFillIn: false, useKeywords: false, termSetId: "51f18389-f28a-4961-a903-ee535f7c620d", levelToShowTerms: 1 }, context, initializeCountryTaxPicker);
                                      taxPickerIndex["#taxPickerContinent"] = 0;
                                  });
                          });
                  });
          });
  });
  
  function initializeCountryTaxPicker() {
      //if (this._selectedTerms.length &gt; 0) {
      //    $('#taxPickerCountry').taxpicker({ isMulti: false, allowFillIn: false, useKeywords: false, termSetId: "0cc96f04-d32c-41e7-995f-0401c1f4fda8", filterTermId: this._selectedTerms[0].Id, levelToShowTerms: 2, useTermSetasRootNode: false }, context, initializeRegionTaxPicker);
      //    taxPickerIndex["#taxPickerCountry"] = 4;
      //}
  }
  
  function initializeRegionTaxPicker() {
      //if (this._selectedTerms.length &gt; 0) {
      //    $('#taxPickerRegion').taxpicker({ isMulti: false, allowFillIn: false, useKeywords: false, termSetId: "0cc96f04-d32c-41e7-995f-0401c1f4fda8", filterTermId: this._selectedTerms[0].Id, levelToShowTerms: 3, useTermSetasRootNode: false }, context);
      //    taxPickerIndex["#taxPickerRegion"] = 5;
      //}
  }
  
  function getValue(propertyName) {
      if (taxPickerIndex != null) {
          return taxPickerIndex[propertyName];
      }
  };
  
  //function to get a parameter value by a specific key
  function getQueryStringParameter(urlParameterKey) {
      var params = document.URL.split('?')[1].split('&amp;');
      var strParams = '';
      for (var i = 0; i &lt; params.length; i = i + 1) {
          var singleParam = params[i].split('=');
          if (singleParam[0] == urlParameterKey)
              return singleParam[1];
      }
  }
  
  function chromeLoaded() {
      $('body').show();
  }
  
  //function callback to render chrome after SP.UI.Controls.js loads
  function renderSPChrome() {
      var icon = decodeURIComponent(getQueryStringParameter('SPHostLogoUrl'));
  
      //Set the chrome options for launching Help, Account, and Contact pages
      var options = {
          'appTitle': document.title,
          'appIconUrl': icon,
          'onCssLoaded': 'chromeLoaded()'
      };
  
      //Load the Chrome Control in the divSPChrome element of the page
      var chromeNavigation = new SP.UI.Controls.Navigation('divSPChrome', options);
      chromeNavigation.setVisible(true);
  }
  </code></pre>