Linked report appears in Firefox but not in Chrome

(3 posts) (2 voices)

Tags:

No tags yet.

  1. rmanes, Member

    We have a report that works fine on Firefox 65.0.2, but not on Chrome 73.0.3683.86. We are running myDBR 5.4.0 (build 3849).

    The code that generates the reports is the following:

    select 'dbr.report', 'sp_DBR_ReportA', 'inRecID=RecID', 'load2_result'; select 'dbr.button', '344 big button', 'hiddenb load2'; select inRecID AS RecID;

    select 'dbr.embed_object', 'load2_result';

    select 'dbr.javascript', "$('.load2')[0].click()", 'onload';

    select 'dbr.report', 'sp_DBR_ReportB', 'inRecID=RecID', 'load3_result'; select 'dbr.button', '888 big button', 'hiddenb load3'; select inRecID AS RecID;

    select 'dbr.embed_object', 'load3_result';

    select 'dbr.javascript', "$('.load3')[0].click()", 'onload';

    On Firefox, both the 'load2_result' and 'load3_result' divs load successfully with the information from the reports, but on Chrome only 'load3_result' is populated. Chrome produces an empty 'load2_result' div and sp_DBR_ReportA is never run - I inserted a javascript alert in the report while debugging and it fired in Firefox, but not in Chrome.

    I also noticed that in Firefox, both the 'load2/3_result' divs enclosed a second div like so:
    <div id="load2_result"> <div class="inline_animate"> <script> function reload_callback() {$('.load2')[0].click();} </script> ... </div> </div> <script>$(document).ready(function() {$('.load2')[0].click()});</script>

    However, in Chrome, the same block for the 'load2_result' looks like:
    <div id="load2_result"></div> <script>$(document).ready(function() {$('.load2')[0].click()});</script>

    The div for the 'load3_result' looks like:
    <div id="load3_result" style=""> <div class="inline_animate"> <script> function reload_callback() {$('.load3')[0].click();} </script> ... </div> </div> <script>$(document).ready(function() {$('.load3')[0].click()});</script>

    Do you know what is happening and how we can get the sp_DBR_ReportA to run and populate the 'load2_result' div in Chrome?

    If I've left anything out, please let me know and I'll try to provide you with any other relevant information.

    Thank you for your time

    Posted 4 months ago #
  2. myDBR Team, Key Master

    It seems to be a Chrome issue, where a click event gets ignored. It's unrelated to myDBR and jQuery. See CodePen for pure JS example.

    You can make it work in Chrome with help of setTimeout:

    select 'dbr.javascript', "$('.load2')[0].click();", 'onload';
    
    select 'dbr.javascript', "setTimeout( function() { $('.load3')[0].click(); }, 1);", 'onload';

    --
    myDBR Team

    Posted 4 months ago #
  3. rmanes, Member

    Thank you very much! Your help is invaluable - the delay resolved our issue. The very quick support on the forums is one of the (many) reasons we continue to use myDBR.

    Posted 4 months ago #

Reply

You must log in to post.