i'm trying to use PDFObject for my brochure what i want is for the user to select a vehicle and download the specific vehicle that she/he has chosen. here's my code:
<form method="get" action="">
  <div class="form-group"><h5>Model</h5></div>
  <div id="select-vehicle" class="form-group">
    <select class="form-control">
      <option selected disabled> Select Vehicles</option>
    </select>
  </div>
  <div class="form-group">
    <button type="submit" value="submit" id="submit" disabled class="btn btn-default">DOWNLOAD</button>
  </div>
</form>
and this is my working javascript:
var workers = ["86", "Altis", "Avanza", "Altis", "Camry", "Fortuner", "FJ Cruiser"
            , "Hiace", "Hilux", "Innova", "LandCruiser", "Prado", "Previa", "PriusC"
            , "Rav4", "Vios", "Yaris"];
        for(var i=0; i< workers.length;i++)
        {
        //creates option tag
          jQuery('<option/>', {
                value: workers[i],
                html: '2017' + ' ' + workers[i] + ' ' + '®'
                }).appendTo('#select-vehicle select'); //appends to select if parent div has id dropdown
        }
          $('button').click(function(event) {
            var value = $( "select" ).val();
            $('form').attr('action', '../../vehicles/' + value +'/');
          });
        $('select').change(function(){
          if ($(this).val())
          {
            $("button").removeAttr('disabled');
          }
        });
i wanted to pass this $('form').attr('action', '../../vehicles/' + value +'/'); to the PDFObject so that it will look for the right filename to download the file.
 
     
    