title: Using DOMDOCUMENT to pull JavaScript values
body: <p>Is it possible to use DOM Document to pull javascript values?</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var datePickerDate = "October 14, 2014";
  
    $(document).ready(function(){
      // meetings datepicker
      $("#datepicker").datepicker({
        showOn: 'button',
        buttonImage: '/images/calendar.gif',
        buttonImageOnly: true,
        onSelect: function(dateText, inst) {
          populate_meetings(dateText, 0)
        },
        dateFormat: 'd MM yy',
        minDate: new Date(2009, 0, 1), maxDate: 0
      });
      $('#datepicker').datepicker('option', 'defaultDate', new Date("October 14, 2014"));
      $('#datepicker').val("October 14, 2014");
    });
      //call on page load to get meetings and date
      populate_meetings("October 14, 2014", 15515);
  &lt;/script&gt;
  </code></pre>
  
  <p>this is output in the html so i know its there... and i want to read the date  so pull var datePickerDate = so it returns October 14, 2014</p>
  
  <p>-- alittle more clarification---</p>
  
  <p>im using domdocument to scrape a site and grab the html like so</p>
  
  <pre><code>$html = file_get_contents($url);
  
  //set the main page html code that will be resused
  $dom = new DOMDocument();
  // load html
  @$dom-&gt;loadHTML($html);
  </code></pre>
  
  <p>within the html is some javascript that has a date in it.... i would like to grab that date and stick it in a veriable</p>
  
  <p>populate meetings just populates a dropdown box with the dates</p>