Log in

View Full Version : not printing smartphp calendar event text in mozilla



udaybabu
12-21-2012, 05:58 AM
Hi,
I am using smart php calendar in my application here i am using custom print for print background colors and hole calendar.

but when i print the calendar its working in google crome but not working in mozilla..

here is my custom print code..


<script>
function printPage(printpage1)
{
var headstr = "<html><head><title></title></head><body><div style='-webkit-print-color-adjust:exact; color: #ffffff;'>";
var footstr = "</div></body>";
var newstr1 = document.getElementById(printpage1).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr+newstr1+footstr;
window.print();
document.body.innerHTML = oldstr;
location.reload();
return false;
}

</script>

bernie1227
12-21-2012, 06:19 AM
That's because -webkit-print-color-adjust is for webkit alone, hence, it only works in webkit browsers (chrome and safari).

If you want further help, you'll need to post your whole code.

udaybabu
12-21-2012, 06:44 AM
Hi, I removed -webkit-print-color-adjust but still same prob..

bernie1227
12-21-2012, 07:08 AM
Do you have a live page you can show us? It should be much easier to diagnose the problem on a live page.

udaybabu
12-21-2012, 07:30 AM
4855
4856

you can see the images what i am getting..