Cross Site Scripting Error Catch

I have a web page which houses an iframe. Inside the iframe is a website. The website comes from a dynamic url variable so practically any website can be housed inside of the iframe. Some domains of the websites to be housed in the iframe may be forwarding domains. I want to be able to detect, through javascript, that this domain is a forwarding domain. However that is not possible because of cross site scripting securities.

What i have noticed in the chrome console is that when i try to access information from the the website housed inside the iframe, there is an actual error message displayed by chrome. However i have not been able to obtain that error message in my javascript. As you can see by the image, i have the domain that i pointed the iframe to, and then the actual domain of the website in the iframe, noted by chromes error message.

Does anyone have any idea how i can get that error message? I have tried using try catch(err) but that does not seem to work. Or, better yet, any idea how to get the details of the site inside of the iframe from javascript? The only detail i need is its URL.

Thanks in advance!

Redirect Error Image


You can't access what the current location of the iframe is, or whether it has redirected, for security reasons. The only exception is if you are checking whether the iframe contains a page that is in the same origin as yours; in that case, you will be able to access the iframe.

Need Your Help

Pointer Errors in C++

c++ memory vector

I have a std::vector type that holds pointers to objects within my application. The declaration for which looks like this:

Apex. Calling proc within htp.prn?

sql oracle plsql oracle-apex

I'd like to know, how to call proc under the button in APEX.