IE8 checkbox not printing bug fix using jQuery

checkbox IE8 bug

IE8 has a bug where if you check a checkbox then print the form the checkbox does not show as being checked. MSFT bug #431489 I’ve found that this piece of code solves that problem and it works for HTML5.

IE8 checkbox printing bug FIX

// fix for ie8 printed checkbox bug
$('input[type=checkbox]').live('change', function(){
		$(this).attr('checked', true);
	} else {
		$(this).attr('checked', false);

You can also try this method of changing the DOCTYPE tag if you don’t need HTML5 markup.

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “”>

Code Tutorials

How to create a 1 gig file

dd if=/dev/zero of=big-file.bin bs=1g count=1


mkfile 1g big-file.bin

Code Tutorials Work

How to tar a directory and only include certain file types

find myProjectDirectory -type f \( -name \*\.php -o -name \*\.js -o -name \*\.css -o -name \*\.inc \) | xargs tar -rf myProjectTarName.tar
Code Tutorials Work

How to change file or folder permissions recursively with chmod

To set only files that end with .tpl to 600 (pattern escaped with slashes)

find . -name \*\.tpl -exec chmod 600 {} \;