Archives for Javascript
How to send a PHP array to JS object in WordPress
To make a PHP array available to JavaScript (js), first have to encode it in json. Then pass the json object to Javascript. Its important NOT to include any quote…
Get Year month and date in Javascript
This is a simple example on How to handle Javascript Date, month and day. Click the button to display the formatted numbers. <button>Try it</button> <script> function formatDate() { var date…
HandleBars with ExpressJS
To see her, to love her! HandleBars! loving it! Usage: {{!1.}} <h1>{{title}}</h1> <h1>{{}}</h1> <h1>{{article/title}}</h1> {{!2.}} {{{link "See " }}} {{{link }}} {{{link "See " href=}}} {{!3.}} {{#list people}}{{firstName}} {{lastName}}{{/list}} {{!4.}}…