Posts Under html Category
HTML mail() Sending as Plain Text
$to = "email@address.com"; $subject = "SUBJECT"; $message = "<b>MESSAGE</b>"; $headers = ‘MIME-Version: 1.0′ . "\r\n"; $headers .= ‘Content-type: text/html; charset=iso-8859-1′ . "\r\n"; $headers .= ‘From: Mailer ‘ . "\r\n"; mail($to, $subject, $message, $headers); The above code does not always send emails in HTML as it should, it turns out there is a PHP Bug (http://bugs.php.net/15841) that comes into play with QMAIL and carriage returns. If this is the case you…
PNG Transparency in IE 6 Using Javascript
Earlier versions of Microsoft Internet Explorer(IE6 and below) didn’t know how to handle the transparency in PNG image files. Luckily this can (somewhat) be corrected using some Javascript. Include the following function in either your site’s javascript file or in the head of your HTML document. function bgPng(){ for(i=0; i<document.all.length; i++) { var bg = document.all[i].currentStyle.backgroundImage; if(bg.match(/\.png/i) != null) {…
Stop mouse click in browsers
There have been multiple ways to stop your user/s from right clicking on your site, but many of them now fail due to the way firefox’s contextual menu loads. Below is an example of how to do it: function _c(e) {if (document.all) {if (event.button==2||event.button==3) {return false;}} else {if (e.button==2||e.button==3) {e.preventDefault();e.stopPropagation();return false;}}if (e.which) {}}if (document.all){document.onmousedown=_c;}else{document.onclick=_c;document.ondblclick=_c;}</span> ..and here is the full working example in a webpage: <html> <head> <script> function _c(e) {if…