locked
Outlook Add-In fails to reload page location.reload(true); RRS feed

  • Question

  • In Internet Explorer only (works in Chrome and FireFox), when the location reload line is executed the script does not reload the page.  Instead, in the console I get the following 2 entries: 

    Agave.HostCall.IssueCall

    Agave.HostCall.ReceiveResponse

    Any ideas why this happen in IE, not other browsers and how to fix it?

    function onQuerySucceeded() {
            var userEmail = web.get_currentUser().get_email();
            if (userEmail.length > 0) {
                location.reload(true);
                clearTimeout(tid);

            }
            else {
                if (tid != null)
                    clearTimeout(tid);
                tid = window.setTimeout(function () { checkForCurrentUser() }, 1000);

            }
        }


                            
    Friday, February 3, 2017 9:31 PM

All replies

  • Hello,

    The forum is for Outlook related programming questions. I'd suggest asking Office Apps specific questions on the Developing Apps for Office 2013  forum instead.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Friday, February 3, 2017 10:54 PM
  • Hi Pdoc,

    >> when the location reload line is executed the script does not reload the page

    Do you mean there is no change after “location.reload(true);” in IE? I made a test with this, the web page will total turn to Office add in page from Outlook mail page.

    What is your IE version?

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 6, 2017 9:06 AM
  • I'm not sure what happened.  I gave up.  The javascript redirect works but only if it is to a new page, otherwise it appears to be cache  with no request making it to the server.

    I added a few ajax calls to solve the issue.

    Thanks Edward.

    Monday, February 6, 2017 4:11 PM
  • Hi Patrick,

    Thanks for sharing.

    I would suggest you mark your reply as answer to close this thread, and others who run into the same issue would find the solution easily.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, February 7, 2017 5:47 AM