I'm having a huge problem with my print button on the confirmation page. When user clicks "submit", the "thanks message" appears, with no print button and a bunch of garble.[attachment=0]printbuttoncf.jpg[/attachment]
Any thoughts?
Any thoughts?
Hmmm, you have the confirmation page action active ? if yes then could you please try to use the "Multi page" action instead ? it should do the same thing.
Regards,
Max
Regards,
Max
Maybe my code is wrong? I get the same thing w/multi page
<?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);
?>
Hi,
Please use plain JS code inside a "Load JS" action, using JS code inside PHP may generate errors, and you can't sport issues easily.
Regards,
Max
Please use plain JS code inside a "Load JS" action, using JS code inside PHP may generate errors, and you can't sport issues easily.
Regards,
Max
This topic is locked and no more replies can be posted.