I am attempting to count some dynamic objects on a search result page. The window has three frames. Using the developer console in IE and Chrome, I am able to find the objects using document.querySelectorAll('button') if I change the location to be searched to the iframe where those contents reside. If I change the location to the navigation frame, I get different objects that do not include the objects for which I am searching.
Lastly, if I narrow the search by class while in the navigation frame, I get the message "Permission Denied," indicating a same-origin policy issue in locating the objects from outside the iframe in which they reside.
click on image java script 1 Answer