Fix png transparency problem in IE 5.5 and 6 | How Fix png transparency

How to fix png transparency problem in IE 5.5 and 6

You just have to insert the following code in the head tag of your web page.


So that's it. This is the way to fix the png transparency problem in IE 5.5 and 6.

This code will only execute if user's browser will be IE 6 or prior than IE 6. So there will be no extra load in your web browser if it is firefox, google chrome, opera, safari or internet explorer greater than 6.

Get missing leading zero while conversion of number to string in javascript

Today while developing the countdown module, i got a requirement to show the days value which was a number like 01,02,03,04.... up to 30, in two different spans in such a way that the leading 0 of 01 value should be shown in first span and then 1 in second span, likewise if we have 21 as a value then 2 will be shown in first span and 1 will be shown in second span. I Just want to clear your confusion, in my example the value of days variable change dynamically when countdown start. I was very much amazed when i saw the conversion of number 01 to string resulting in only 1, the conversion of number 02 to string resulting in only 2, and then suddenly i thought where is leading zero???

So to solve this problem and get missing leading zero, you have to follow the example given below

The variable days store integer(Number, Numeric) value that comes dynamically, that's why the value is not surrounded by any " ". If days="01" then there was no problem by getting 01 as a 0 and 1 because any thing inside the double quotes is called string and we can get substring easily from string.

0 comments:

Post a Comment