Wednesday, November 11, 2009

[jQuery] Get the real html from an iFrame

Hallo all.

I have an iframe with an id.
I need to get the html content of this iframe.

So from the iframe doc read I tried like this

var html = parent.$('#indexIframe').contents().find('html').html()

In this way I get the content of the tag html of the iframe, so the
head definition and the body definition.

<head>...</head>
<body>...</body>

I would like to get the parent tag in a way to have:

<html>
<head>...</head>
<body>...</body>
</html>

Any idea?
Kind regards

Massimo

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate