if there is no further nesting you can directly target your iFrame by a class, id, tag , whatever …
if this structure is within a hype-widget, which is a iFrame itself,then have a look over here
Why are you using a HTML widget and putting another iframe in it?
A HTML widget is a speciel element that already has an iframe in it.
Using the link that Hans has supplied above (again here if you don't want to scroll up)
You will see how you can drill down into a HTML widget to get to the inner elements.
But, really I don't know why you need to have an iframe in an iframe. Gonna make it so laborious drilling down to get to it. Why not use another element? Or just use the HTML widget for what you want.
I just try to move the the content inside iframe after the first mouse click.
I’ve inserted the iframe code right now in text element and i’ve assigned to it id widget.
Lets see if there isn’t another way to do what it is you’re trying to achieve. I don’t understand why you have an element that has overflow hidden and when trying to click the iframe inside said element you want to change the position by changing the top property. Also the iframe itself has the position of top: -587px; so effectively you want to move it up by 10px. Again, I’m not sure why.
BTW and I’m pretty sure you haven’t read the links we gave you or just don’t understand them but you cannot just access an iframe like other elements.
Also if the iframe (or whatever is in the innerHTML) is bigger than the elements bounds then it takes on the elements events and you cannot run an onclick on an iframe.
If you run your javascript onmouseover it’ll work. If you need a click then you’ll have to use another element and attach the script on mouse click to that element. Or have a transparent element over the top of your iframe element and onclick it moves the iframe and disappears. This will mean 2 clicks though.