ilich / MvcReportViewer

ASP.NET MVC Html Helpers for ReportViewer Control.
MIT License
282 stars 131 forks source link

Blank iframe Loading #180

Closed DanielCauser closed 7 years ago

DanielCauser commented 8 years ago

Hello, i've found a problem witch i can't seem to figure out.

I'm using reportviewer on MVC 4 application. I have a page witch loads the reportviewer iframe via ajax. When I set the iframe to load in a div in my client hmtl, it takes a few moments with a blank iframe, until it loads the content of the report.

I'm trying to set jquery load and ready listeners to the iframe, so instead of the blank space it would show a loading gif until the iframe is ready.

Any help ?!

ilich commented 7 years ago

Hello Daniel,

I am sorry for the late reply. I am busy with other projects, and do not have a lot of free time at the moment. I hope http://stackoverflow.com/questions/12267010/how-can-i-detect-whether-an-iframe-is-loaded will help you. For example,

$(function(){
    $('#MainPopupIframe').on('load', function(){
        $(this).show();
        console.log('load the iframe')
    });

    $('#click').on('click', function(){
        $('#MainPopupIframe').attr('src', 'http://heera.it');    
    });
});