get src of element on Mouseover in iframes
I am developing an app wherer I am loading websites in iframe. & on mouseover on that site/iframe anywhere, it should give me the src of an element on which mouse over is done...
I am writing a jquery as,
//on HTML Mouse over
prevElement = null;
curElement = window.event.srcElement.tagName;
window.status = curElement;
& HTML Part where the URL will be loaded is
<iframe height="100%" width="100%" class="netframe" src="#" id="main_frame" name="content">
But thi sis not working, it gives a me src of only iframe, but not of its content site.
you would need to add the event handler in the framed site, not the framing site.
How can we do that? Cause the target loading site can be anything....
As well, when I am trying to do something like this,
var collAll = document.frames("main_frame").document.all;
Its giving me Access denied error.
no, it cannot. it has to be a document you created and published.
Originally Posted by ShwetaA
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)