View Full Version : Getting whole content of iframe.

01-02-2012, 04:37 PM
What wrong in this code?

<script type="text/javascript" src="jquery.js"></script>
$(function (){
function manda(){
var text = $('#frame').contents().find('p[class=no_boder]').html();

i've already tried using this ->

How can i get the content?

Old Pedant
01-02-2012, 09:35 PM
Question: Do the iframe contents come from the SAME DOMAIN as your main page? If not, nothing you can do will get the contents, as cross-domain scripting is not allowed (with a couple of very limited exceptions that only apply if you "own" the code used in both domains).

Oh, and by the by, this is a jQuery question, not strictly JavaScript. I have no idea if your syntax is correct in jQuery. You might want to post in the jQuery forum to get the experts there involved.