Oct 20
2005

Just now encountered a problem while using PHP to send out email with Japanese subject line. The Japanese subject line is not properly encoded although I have set the encoding in the email header:

    $headers = “MIME-Version: 1.0\r\n”;
    $headers .= “Content-type: text/html; charset=Shift_JIS\r\n”;

I searched the Google and found something useful. Continue reading »

Oct 20
2005

电脑的用途真多啊,原来坏了都还可以这么用…真是创意无限啊 ^_^

Continue reading »

Oct 20
2005

Original article: http://www.somacon.com/p143.php

Description:
===========
This pair of Javascript function can get or set the checked value of a group of radio buttons. These functions are specially designed for dynamic pages, and work without error with zero, one, or more radio buttons. Also, because the radio length is saved before looping, this function is much faster. Finally, the functions are granted to the public domain.

// return the value of the radio button that is checked
// return an empty string if none are checked, or
// there are no radio buttons

function getCheckedValue(radioObj) {
if(!radioObj)
return “”;
var radioLength = radioObj.length;
if(radioLength == undefined)
if(radioObj.checked)
return radioObj.value;
else
return “”;
for(var i = 0; i < radioLength; i++) {
if(radioObj[i].checked) {
return radioObj[i].value;
}
}
return "";
}
Continue reading »