Saturday, September 7, 2013

Latest Method to Change Facebook Like Box Border Color

As of today, this method still works. This may not work in the future as Facebook changes its support every now and then. Anyway, here are the codes: The CSS: .fb-like-box {   width: 348px;   height: 248px;   overflow: hidden;   position: relative;   border: 1px solid #dddddd; } .fb-like-box .dummyBox {   margin: -1px 0 0 -1px;   border: 0px; } The HTML: <div class="fb-like-box"> <div class="dummyBox"> <fb:like-box...
Read More »

Friday, September 6, 2013

Javascript to Sniff Android Based Browsers

Updated on 7th of February, 2014: The is_touch_device() function in the following is no longer working. Please check out my latest is_touch_device() function that works in the latest Chrome browser (Nevertheless, the rest of the codes are still working. Just replace the latest is_touch_device() function will do): http://webtrick101.blogspot.com/2014/02/detecting-browsers-touch-capability.html Using Javascript to sniff out Android based broswer is tough as the list of Android devices...
Read More »

Setting Cookie via Javascript Not Working for my Android 2.33 Gingerbread Device

I believe the current Android based device won't have this issue. But it happened to my antique Android Gingerbread based phone. After plenty of testings, here is my conclusion: Javascript with Problem: document.cookie = "apple = orange;"; Javascript that worked on my phone: document.cookie = "apple=orange;"; Very unexpected problem. Simple and unexpected solution as well. Now I kind of like this name of Android version: Froyo (2.2–2.2.3) if you know what I mean. :...
Read More »

Thursday, September 5, 2013

When DOM marginLeft property is not working in Mobile tablets such as iPad and Nexus 7...

I had this problem and I was unable to get it work until several hours of debugging: Javascript: document.getElementById("myDiv").style.marginLeft = "100px"; HTML: <table><tr><td align=center><div id="myDiv"> . . . </div></td></tr></table> Guess what? It was due to the very unexpected "align=center" that prevents the div beneath from moving anywhere. Weird problem. Weird cau...
Read More »