lundi 2 février 2015

insert custom taxonomy into javascript


i got a simple javascript to display a future time. the script is executed from post's content.



<script type="text/javascript">
<!--
var currentTime = new Date()
currentTime.setMinutes(currentTime.getMinutes() + 30) */Ready Minutes*/
currentTime.setHours(currentTime.getHours() + 5) */Ready Hours*/
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
document.write(day + "/" + month + "/" + year)
//-->
</script>


it displays a date and time + whatever value i set in (30)minutes and (5)hours. id like to use a custom taxonomy instead of these values for easier post edit if i need to update it to different value


so something like this:



currentTime.setMinutes(currentTime.getMinutes() + <ready_minutes_taxonomy>) */Ready Minutes*/


is this even possible? thank you in advance!





Aucun commentaire:

Enregistrer un commentaire