I am using getelementbyid to locate the source file of and iframe, but when I load the source file, I get redirected to my original page.

I looked at the source file code and found this redirect at the top of the code

if (window == window.top) {
// Redirect to parent page if opened up by itself
top.location.replace("../ExpressSearch.aspx" + location.search);
}

is there a way for me to access the elements in the source code without having it directly open?

or

Can I remove this redirect from the source code?