web developing
24 May
It sounds strange but most of the web developers still use == operator to check the ‘undefined’ value of a JavaScript variable. Don’t know why but however there’s typeof operator and I strongly recommend it for that purpose.
It simply should be:
typeof variable == ‘undefined’
20 May
The task can be described as it is. There’s a Flex 3 DateChooser component integrated with a custom timeline component. The problem occurs when exporting the data from the flash to the browser. Than I write the unix timestamp to the url of the browser. Of course I’m using date.getTime() in Flex.
Applying getTime() to any object of type Date in Flex results in a unix timestamp with included milliseconds. Of course the server side technology which in our case is PHP should devide by 1000 to remove the milliseconds. (more…)
18 May
Sometimes there’s a need to reload the page with JavaScript. There’s a built in method for that! Just use:
window.location.reload()
14 May
Although the SWFObject method – createSWF is working fine under IE sets the wmode not to be transparent but with the strange value of window, i.e. <PARAM name=”WMode” value=”Window” />
to replace the createSWF method calls with other SWFObject method – embedSWF. There you can simply describe the desired wmode for the flash.
12 May
Zend_Date is the Zend Framework module for manipulation of dates. It gives several advantages. Everybody how has dealed with dates knows that built in PHP date function cannot manage dates before 1901. With that kind of problems Zend_Date is pretty fine.
If you have only
Zend_Date::set($timestamp);
is not enough. The timestamp is an int representation and the framework cannot get the timezone from that and trows an error.
Replace the line above with these: (more…)