Is it possible to use DOM Document to pull javascript values?
<script type="text/javascript">
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);
</script>
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
-- alittle more clarification---
im using domdocument to scrape a site and grab the html like so
$html = file_get_contents($url);
//set the main page html code that will be resused
$dom = new DOMDocument();
// load html
@$dom->loadHTML($html);
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
populate meetings just populates a dropdown box with the dates