CSS for browsers to print background colors & images

Is there any css code for browsers to print out background colors? No, there is no such css code, background images and colors are ignored for browsers. So don’t rely on background colors for printing.

To let browsers print background colors and images, you need to configure your browsers option.

Continue »

Hide some part on the web page when printing

What do you do if you want to hide some part when you print your web page? I didn’t find a best solution maybe, but it works for now.

The answer is to use a separate css for printing.

Here is a sample code.

<link rel="stylesheet" type"text/css"   href="main-print.css" media="print"></link>
<link rel="stylesheet" type"text/css"   href="main.css" media="screen"></link>

Continue »

Javascript Textarea Editor Review

The following textarea editors are testing today.

1. Fck Editor

This is not free anymore. So it can not be used for our project anymore.

2. jwysiwyg.

It does look simple and nice, and it works perfect under Firefox. But some buttons doesn’t work well on IE.

Continue »

The best screen shot tool for browsers

I tried several screen shot plugins for Firefox and conclude that LightShot is the best. It’s simple to use. First click the logo at the status bar. Then drag an area, and then save it or copy it. That’s it.

It’s also available for IE and as a standalone application.

The problem of truncating text from SQL Server in PHP

PHP and SQL Server are a powerful combination, however sometimes data stored in a text type column is truncated for no apparent reason after 4096 characters.

I got this problem today when I want to display text data from SQL Server 2000. Apparently, I need to increase the maximum size of a text column to be returned from SQL Server by PHP. Since I have control over the Web Server. Here is how I fixed the problem.

Continue »

Productivity in 2 words

Start Now.

Make IE show transparent image correctly

I got a IE display problem when I add my logo for programcreek. The logo is a transparent image. It shows well on firefox, Chrome, like the following

but got the following problem in IE. The transparent background is now a black background.

Continue »

Javascript Sleep Function

I want a sleep function in javascript.

In Javascript, it is setTimeout().

setTimeout() – executes a code some time in the future

Continue »