Forums

Print Button and Confirmation Page

mduda 03 Sep, 2012
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?
Max_admin 03 Sep, 2012
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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mduda 06 Sep, 2012
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);
?>
Max_admin 06 Sep, 2012
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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.