วันเสาร์ที่ 3 พฤศจิกายน พ.ศ. 2550

javascript,php create xml file

# include header charset utf-8
header("Content-type: text/xml; charset=utf-8");

# example structure



# display
echo $xml;

# build file
$file = fopen( "content.xml","w+");
fputs($file,$xml);
fclose($file);

# redirect file
header("Location: content.xml");

วันพุธที่ 31 ตุลาคม พ.ศ. 2550

javascript check form

Part I (check text box,redio box,list box):















Part II (check email format):















Part III: call to use

php class method check login

javascript opener

#code
window.opener.location.reload();

detail: if you open 2 window and you want update one window ,anothor window will reload too

javascript resize window

#code
window.resizeTo(350,200)

detail :
# width = 350
# height = 200

php convert utf-8 to tis-620

# convert utf-8 To tis-620
$string = iconv("TIS-620","UTF-8",$string);