Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2009
    Thanked 1 Time in 1 Post

    Getting whole content of iframe.

    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?

  2. #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,947 Times in 4,908 Posts
    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.
    Be yourself. No one else is as qualified.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts