Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get the element by ID inside iFrame
Message
From
27/01/2017 18:02:08
 
 
To
All
General information
Forum:
Javascript
Category:
IFrame
Title:
Get the element by ID inside iFrame
Miscellaneous
Thread ID:
01647088
Message ID:
01647088
Views:
60
One iFrame is using a GetElementById() approach to get a reference to an object in another frame.

So, this works:
loBody=parent.MESSAGE.document.getElementById("LXBody")
Inside the iFrame MESSAGE, is the HTML which contains some div tags. One of them has an id of Test. The following cannot be found:
loDiv=parent.MESSAGE.document.getElementById("Test")
I have read somewhere that it is not possible to access an id from another iframe but the root itself. If that is the case, this would explain this scenario. Would there be a way to access an element under the root in an iFrame?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform