July 27, 2024

MoDCore

Welcome to the core

Add Print & date to reportal Page

Here is a quick and simple way to add in a print link and date to a reportal page.

The print this page is a link which will open up the print dialog in your browser.

Example below

Script below

<div class=”noprint”><a class=”strapline” href=”javascript:window.print()”>Print this Page</a></div>
<script language=”Javascript”>
<!–
var now = new Date();
var days = new Array(
‘Sunday’,’Monday’,’Tuesday’,
‘Wednesday’,’Thursday’,’Friday’,’Saturday’);
var months = new Array(
‘January’,’February’,’March’,’April’,’May’,
‘June’,’July’,’August’,’September’,’October’,
‘November’,’December’);
var date = ((now.getDate()<10) ? “0” : “”)+ now.getDate();
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;}
today = days[now.getDay()] + “, ” +
months[now.getMonth()] + ” ” +
date + “, ” +
(fourdigits(now.getYear()));
document.write(“<div align=’left’ class=’strapline’>”+today+”</div>”);
//–>
</script>

 

Enjoy 🙂

Copyright © All rights reserved. | Newsphere by AF themes.