I have a situation in which a hidden IFRAME loads a page. The page does not return HTML data but rather a raw JSON string. Since the data is not HTML there is no "body" tag and I can not use the following suggestion that was given in another SO question:
iFrameBody = iFrame.contentWindow.document.getElementsByTagName('body')[0];
The content of the IFRAME is similar to:
IFRAME:
-----------------------------------------------
| {"JSON" : "HERE" } |
-----------------------------------------------
and not
------------------------------------------------
| <html> |
| <body> |
| {"JSON" : "HERE" } |
| </body> |
| </html> |
------------------------------------------------
I'm basically asking how to get the raw contents of an iFrame. Adding pseudo HTML tags is not an option. Not using an iFrame is not an option. Thanks!