title: How to pass parameters to a Yii2 view from javascript file?
body: <p>I have a js file through which I am making an ajax call to render a view file and pass some data. How can this be done? Here is my ajax call</p>
  
  <pre><code>$.ajax({
          type: "GET",
          url: "index.php?r=orders/on-select",
          data: {myVar: myVar},
          success: function (data) {
              //I want to render the view here and pass the data
          },
      });
  </code></pre>