Support

Admin Tools

#25069 Form print button doesn't work here, could it be the admin tools?

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by dkdb on Wednesday, 04 May 2016 04:14 CDT

dkdb
 I have this code embedded in one of my HTML forms:
    $script = "
    jQuery(document).ready(function(jQ){
      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>'+jQ(id).html()+'</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;
      id = '#print_div';
      jQ('#print_button').css('visibility', 'visible');
      jQ('#print_button').click(printPage);
    });
    ";

This is supposed to create a print button for my form that is encapsulated in 'print_div'.
But somehow the button doesn't work on my page, but works on other websites.
Can admintools somehow interfere in such an embedded script?

Best regards Kenneth

tampe125
Akeeba Staff
Hello,

you can easily test it.
Please disable Admin Tool System plugin: your button starts to work or not?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

dkdb
Ahh, ok, excellent, I just tested, and also temporarily replaced the .htaccess.
No change, so something is rotten :-)
Thankyou very much for the heads up!

Best regards Kenneth

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!