Is it possible to obtain the id from an iframe using the following method?
var iFrame = window.top.document.getElementById('window_<?php echo $_product->getId() ?>_content');
However, I am struggling to understand how to retrieve the class of the iframe. The site also has the prototype library loaded, but I am unsure how to use the $ selector to target an element in window.top.
I need to do this because the id is generated differently on the site and does not suit my requirements.
I have started experimenting with
var iFrame = window.top.document.getElementsByClassName('theIframe');
but so far, it has not been successful...
Do you have any suggestions on how I can access the class name of the iFrame? How can I use the prototype selector to reach the top level?