Sending correct file size with PHP download script

Originally from http://paul.luminos.nl/update/471: The CrimsonBase website verifies downloads by passing them through a robust PHP script similar to the one published by Andrew Johnson in his article about PHP-controlled file downloads. Andrew makes a very important comment at the end of the article: “If you compress files with Zlib, mod_deflate and so on the Content-Length … Read more

Can’t dynamically add rows to a in IE?

You need to create a TBODY element to add your new TR to and then add the TBODY to your table, like this: <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”><head><title></title></head><body> <table id=”employeetable”> <tr> <th>Name</th> <th>Job</th> </tr> </table> <script type=”text/javascript”> function addEmployee(employeeName, employeeJob) { var tableElement = document.getElementById(“employeetable”); if (tableElement) { var newTable … Read more

input height differences in Firefox and Chrome

The problem is essentially line-height. Chrome sees line-height much like it sees height and Firefox doesn’t. Adding height to the input should solve the problem, though you should be careful that your line-height and height match. For example: height: 20px; line-height: 20px;. http://jsfiddle.net/e2agj/1/ – Last example input is the correct one.