locked
Iframe loading RRS feed

  • Question

  • Hi,
    i am using an iframe in one entity form under a tab. this will invoke a url. but the problem here is it is taking sometime to bring the page into i frame(the url page). i want to show some message user like "page is loading". how to achieve this?
     
    how to handle this?

    which is causing delay... is it asp.net page or ifram to get response from iis...

    please suggest me a way to achieve this?
    Friday, November 13, 2009 12:51 PM

Answers

  • you can delare a flag variable , change the flag value when data loaded , and check this flag to determine if show the message
    Friday, November 13, 2009 4:22 PM

All replies

  • Hi raja,

    You can use following function to show "Loading....." msg on tab click event.

    showLoadingMessage();

    window.setTimeout("FunctionName to load page in iframe",100);

    function showLoadingMessage()
    {
       tdAreas.style.display = 'none';
       var newdiv = document.createElement('div');
       newdiv.setAttribute('id',"msgDiv");
       newdiv.valign="middle";
       newdiv.align="center";
       var divInnerHTML  = "<table height='100%' width='100%' style='cursor:wait'>"; 
            divInnerHTML += "<tr>"; 
            divInnerHTML += "<td valign='middle' align='center'>"; 
            divInnerHTML += "<img alt='' src='/_imgs/AdvFind/progress.gif'/>"; 
            divInnerHTML += "<div/><b>Loading...</b>"; 
            divInnerHTML += "</td></tr></table>";
           
        newdiv.innerHTML = divInnerHTML;
        newdiv.style.background= '#FFFFFF';
        newdiv.style.fontSize="15px";
        newdiv.style.zIndex="1010";
        newdiv.style.width=document.body.clientWidth;
        newdiv.style.height=document.body.clientHeight;
        newdiv.style.position='absolute';
        document.body.insertBefore(newdiv,document.body.firstChild);
        document.all.msgDiv.style.visibility='visible';
    }


    Mahain
    Friday, November 13, 2009 1:00 PM
    Moderator
  • this one will show the loading message. but how would i know wether iframe has loaded the data or not?

    Friday, November 13, 2009 1:05 PM
  • you can delare a flag variable , change the flag value when data loaded , and check this flag to determine if show the message
    Friday, November 13, 2009 4:22 PM