Hi bob
i was using your code to print the thank you page but however its not working in choronoform v5 but it was working in v3. I dont know why but can you help me on this.
i follow your instruction on faqs and this is the code i am using i haven't change anything.
<?php
$doc =& JFactory::getDocument();
$script = "
function printPage()
{
var html, css, csss_file, printWin;
css = \"\";
css = \"<style type='text/css'>\"+css+\"</style>\";
css_url = '';
if ( css_url !== '' ) {
css_url = \"<link rel='stylesheet' type='text/css' href='\"+css_url+\"' media='print' />\";
}
html = '<html><head>'+css+css_url+'</head>'+$(id).innerHTML+'</html>';
printWin = window.open('', '', 'left=100, top=100, width=600, height=400, toolbar=0, scrollbars=0, status=0' );
printWin.document.write(html);
printWin.document.close();
printWin.focus();
printWin.print();
printWin.close();
}
var id;
window.addEvent('domready', function() {
id = 'print_div';
$('print_button').setStyle('visibility', 'visible');
$('print_button').addEvent('click', printPage);
});
";
$doc->addScriptDeclaration($script);
?>
i was using your code to print the thank you page but however its not working in choronoform v5 but it was working in v3. I dont know why but can you help me on this.
i follow your instruction on faqs and this is the code i am using i haven't change anything.
<?php
$doc =& JFactory::getDocument();
$script = "
function printPage()
{
var html, css, csss_file, printWin;
css = \"\";
css = \"<style type='text/css'>\"+css+\"</style>\";
css_url = '';
if ( css_url !== '' ) {
css_url = \"<link rel='stylesheet' type='text/css' href='\"+css_url+\"' media='print' />\";
}
html = '<html><head>'+css+css_url+'</head>'+$(id).innerHTML+'</html>';
printWin = window.open('', '', 'left=100, top=100, width=600, height=400, toolbar=0, scrollbars=0, status=0' );
printWin.document.write(html);
printWin.document.close();
printWin.focus();
printWin.print();
printWin.close();
}
var id;
window.addEvent('domready', function() {
id = 'print_div';
$('print_button').setStyle('visibility', 'visible');
$('print_button').addEvent('click', printPage);
});
";
$doc->addScriptDeclaration($script);
?>