title: Open .pdf file in a new tab
body: <p>In my form I have a ddl that user can choose between some pdf files.<br> I want to pass the ID of the user's selection (it's contains the full path of the pdf) to an window.open command.</p>
  
  <pre><code>//This is the div that contains the data
          &lt;div class="form-group"&gt;
              &lt;div class="row"&gt;
                  &lt;div class="col-xs-12 col-sm-6 col-md-6 col-lg-4"&gt;
                      &lt;label asp-for="FDescr" class="control-label"&gt;File&lt;/label&gt;
                      &lt;select asp-for="FCodeID" class="form-control"
                              asp-items="@(new SelectList(string.Empty, "FCodeID", "FDescr"))"&gt;&lt;/select&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.js"&gt;&lt;/script&gt;
  
  //This is where I load the data in the #FCodeID ddl
  &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              $("#MCodeID").on("change", function () {
                  var url = '@Url.Content("~/")' + "Materials/GetFiles";
                  var ddlsource = "#MCodeID";
                  var items = "&lt;option value='0'&gt;--Select File--&lt;/option&gt;";
                  $("#FCodeID").html(items);
                  var items = " ";
                  $.getJSON(url, { MCodeID: $(ddlsource).val() }, function (data) {
                      $("#FCodeID").empty();
                      $.each(data, function (i, file) {
                          if (file.value.includes("in Use"))
                              items += "&lt;option value='" + file.value + "'" + "style='background-color:orange;'&gt;" + file.text + "&lt;/option&gt;";
                          else
                              items += "&lt;option value='" + file.value + "'&gt;" + file.text;
                      });
                      $("#FCodeID").html(items);
                  });
              })
          })
      &lt;/script&gt;
  
  //This is what I'm trying to accomplish
      &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              $("#FCodeID").on ("change", function () {
                  var url= "#FCodeID";
                  window.open(url, '_blank');
              })
          })
      &lt;/script&gt;
  </code></pre>
  
  <p>I want on the window.open() to open a new tab with the actual path of my file. <br> e.x 192.168.1.1/MyFiles/MyPDF.pdf<br>
  Thanks in advance for your help.</p>