Print selected content from a webpage
This is an alternate to my post Javascript Print Page Area . Try this.
<script>
function cmdPrint()
{
var windowsettings = ” tollbar=yes,location=no,scrollbar=yes,width=600,height=500,left=100,top=50″;
var printcontent=document.getElementById(‘printerContent’);
var popupcontroler = windo.open(“”,”",windowsettings);
popupcontroler.document.open();
popupcontroler.document.write(‘<html><head><title>Printer Dilog</title>);
popupcontroler.document.write(‘</title><body onload=”self.print()”><div align=”center”>’);
popupcontroler.document.write(printcontent);
popupcontroler.document.write(‘</div></body></html>’);
popupcontroler.document.close();</script>
Wrap your webpage content that need to be print with an id “printerContent”
<div id=”printerContent”>This is a test print. This is a test print. This is a test print. This is a test print.</div>
<a href=”#” onclick=”cmdPrint()”>Print</a>
Customizing Joomla Calendar Setup
Joomla 1.5 has calendar-setup
.js file to setup the joomla calendar as per your requirements.
You can customize jcalendar using a javascript callback functions “param_default”.
Here are some examples customizing your joomla calendar. [Read more..]
Detect an AJAX Request in PHP
During Ajax request , using the browser like Firefox, the rquested url can be visible thoruhg console which further can be run from the browser address bar. This can be prevent by PHP’s $_SERVER['HTTP_X_REQUESTED_WITH'] variable. [Read more..]



