If knowledge is power, then sharing knowledge is ultimate powertrip
Latest Updates
You are here: Home >> Tag Archives: Javascript

Tag Archives: Javascript

Feed Subscription

Convert PHP date to javascript date

We can convert PHP date to javascript date as; var dateStr=”2011-08-03 09:15:11″; //returned from mysql timestamp/datetime field var a=dateStr.split(” “); var d=a[0].split(“-“); var t=a[1].split(“:”); var date = new Date(d[0],(d[1]-1),d[2],t[0],t[1],t[2]); Read More »

cakephp include javascript file in view

You probably know that if you have $scripts_for_layout in your site’s layout, then you can do a Cakephp include javascript file in view. For example, if you’d like to include ‘myScript.js’ from some view you would add the following code: $javascript->link(‘myScript’, false); Basically the second param (false), will tell CakePHP not to include the file in-line, but rather where the ... Read More »

Scroll To Top