0

I want to query an id element using the document.getElementById('parameter'). But the id Element is in a chain of several nested iFrames dues to which the query return null value(P.S.:- all the iFrames are of the same domain)

Is there any way by which I can query this id Element across the iFrames without finding out the parent iFrame??

Please help !!

Vipin Verma
  • 5,330
  • 11
  • 50
  • 92

1 Answers1

1

You cant do document.getElementById to look for tags inside iframes, because its completely different document.

Try JQuery:

$('IFRAME').find('#parameter')

This will look in all iframes on a page and then check each iframe for a #parameter.

nbanic
  • 1,270
  • 1
  • 8
  • 11
Grzegorz Kaczan
  • 21,186
  • 3
  • 19
  • 17