February 27, 2010
Up until the introduction of CSS3 if you wanted to display your text in a circle you had to be creative using images or other techniques. The implementation of CSS3 has changed that and you can now transform your <div> into a nice round object.
I was playing around with some of the CSS3 features that are already supported by the modern browsers (Note: The techniques I’m going to be covering here are not yet supported by IE) and I thought to myself. Hell, I have all the tools to make a round <div> at my disposal, so why not do it.
February 26, 2010
There are a few places where this issue has been addressed, but I thought I’d share it with the masses anyway.
I’ve been using an in-house framework for a couple of projects but this is my first time using CakePhp on a project, so I’m certainly no expert and there might well be more efficient or easier ways to do what I’m describing below. With that being said, I came across a small problem while setting up a login script…
February 24, 2010
I created a restricted file download area for a client website, for their clients to download spreadsheets from their site. A problem arose where I got an error message (in Windows) when opening the file directly in Internet Explorer 6, and choosing ‘open’ instead of ‘save’ on the File Download popup. But when opening the same link in Firefox, it opens successfully! This is the error message one gets:
‘C:\Documents and Settings\\Local Settings\Temporary Internet Files\Content.IE5\’ could not be found
It also seems to be an issue in some other Microsoft software (such as Outlook) as well. The error was not given in Internet Explorer, but in whatever program is set to open the file, such as OpenOffice or Excel. The error message differs a little according to the program used, but the problem is that the temporary file cannot be found.
February 23, 2010
This error came from executing this line of code, when uploading an image jpg and then working with it with the PHP GD2 Library:
$im = @imagecreatefromjpeg($file);
The problem is that newer versions of PHP result in an unrecoverable error if you reference a wrong file, or non-jpeg file, according to the manual it is supposed to simply return FALSE, but it does not! The fix is easy, but tedious:
February 23, 2010
Goal: I had to develop a grid (table) for a client that has headers fixed but you can scroll through the content, this is to help in case of grids with hundreds of records, so that if you scroll down a few rows the headers don’t disappear.
Challenge: As with almost all html/css builds, the challenge was to make it work in all browsers (needless to say, IE). If you google the problem you get quick answers like this one: http://www.imaputz.com/cssStuff/bigFourVersion.html ; The scrolling grid works great, but the problem is it doesn’t work in IE, if you google further to find a IE solution you get to something like this: http://geekswithblogs.net/LSheu/archive/2009/01/30/css-table-scrolling-with-fixed-header-for-ie-7.aspx ; works in IE6 but not in IE7, got to another one that works in IE but not Chrome.
February 23, 2010
Recently I was playing around on my sandbox personal site with some ideas to dynamically move and position elements relative to on screen clicks in ways that are compatible with different browsers and different resolutions. The scripts I used to do this were then implemented by a fellow developer on a client’s site to solve a problem with having a customized pop-up div displaying at the correct location when clicking.
Note: Majority of the code was copied from several sources and thrown together and then modified to solve the problem. This is also done without the use of JQuery.
The process can be broken down into several steps.
- Find out which browser is being used and find the size of the client’s window.
- Find out where on the screen was clicked.