Window.opener.location.href get blocking error

I have a website and have a search option on the home page. I need to open two tabs from the home page search and I made it work like this:

window.location.href = 'partnerUrl'; // Other Site URL
window.open('Listing Page URL', '_blank'); // Load may site next page (listing page)

      

and it works fine.

Ok, now from the listing page I need to check which affiliate link was opened from a line of code window.location.href = 'partnerUrl';

. I am trying to do it with window.opener.location.href

, but it returns the following error:

Exception: DOMException: Blocked frame starting my_site_link

from a cross-originated frame access. at Function.getOwnPropertyDescriptor () at process.next () at _propertyDescriptors.next ()

How can I solve the problem? Any suggestion you make will be approved.

+3


source to share





All Articles