SharePoint 2013 DOM dialog object

I’m using SP2013 and I am trying to refresh one of many list web parts on a page with the Manual Refresh button displayed for each list. The current display view has four lists associated with it each with a Manual Refresh button displayed for each. I am trying to refresh via JavaScript. Async Update is enabled as is Show Manual Refresh Button in the respective web parts.

My code works as long as the List Settings>Advanced Settings> Dialogs is set to NO. A full page view.

So, for example, document.querySelectorAll(“#ManualRefresh”) returns a usable object. So, the code to refresh for a specific web part looks as follows:

var myelement-document.querySelector("#WebPartWPQ6");
var refresh=myelement.querySelectorAll("#ManualRefresh");

When in the console I run document.querySelectorAll(“#ManualRefresh”) I am returned an object which in my case has 4 elements since I have four ManualRefreash buttons on the page.

However, when Dialogs is set to Yes the document.querySelectorAll(“#ManualRefresh”) returns a Null object.

Seems I need to use something other than “document” in document.querySelectorAll statement to grab the DOM element from the dialog vs. the document. That is my assumption anyhow.

How do I access the dialog object vs. the document object and then use the queryselector as above modified to use a dialog vs. a page? If my nomenclature is wrong by all means correct me.