Hi, I hope someone can help me!
What I am trying to do is to embed some PHP code within a JavaScript function. Here is the code I have so far:
disableFunc : function (date) {
var dateTime = date.getTime();
var now = new Date().getTime();
//only allow dates more than 7 days from now
return (dateTime < (now + (6 * Date.DAY)));
},
Now, what I would like to do is to replace the '6' with a PHP variable ($Hol_Notice). Have tried the following code but it doesn't work:
disableFunc : function (date) {
var dateTime = date.getTime();
var now = new Date().getTime();
//only allow dates more than 7 days from now
return (dateTime < (now + (<?php $Hol_Notice?> * Date.DAY)));
},
Anyone have any ideas on this?
Regards,
Andy Thomas