Old 17-04-2007, 08:07   #1 (permalink)
Yansky
Registered User
 
Yansky's Avatar
 
Join Date: Apr 2007
Location: Melbourne
Posts: 1
Access iframe DOM

Hi guys, is it possible to read the DOM of an iframe if the iframe's src is from another domain?

I realise I can't manipulate the DOM from another domain for security reasons, but can I access the DOM and just read object's values?

This is what I've tried so far without any success:
Code:
document.getElementsByTagName("iframe").contentWindow; document.getElementsByTagName("iframe").innerHTML; document.getElementsByTagName("iframe").childNodes[0].innerHTML; document.getElementsByTagName("iframe").childNodes[0].nodeValue; document.getElementsByTagName("iframe").documentElement; document.getElementsByTagName("iframe").contentDocument. document.getElementById("testIframe").innerHTML; document.getElementById("testIframe").childNodes[0].innerHTML; document.getElementById("testIframe").childNodes[0].nodeValue;
  Reply With Quote
Old 17-04-2007, 09:19   #2 (permalink)
samuelcotterall
Interactionist
 
Join Date: Sep 2006
Location: Manchester
Posts: 180
Do iFrames strictly fall under the term "Web Standards".
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8