1

I want take a question of this site http://qstn.mthmtcs.ir as a iframe to show in another site. I don't want show all page. I want show just question part.

<iframe src="http://qstn.mthmtcs.ir/index.php?qa=80" width="100%" height="100%" align="center" ></iframe>

i want create a bbcode with this for my website. people can insert url linke in post and show that question.

Philip Kirkbride
  • 21,381
  • 38
  • 125
  • 225
dnshvra
  • 111
  • 2

1 Answers1

0

You can't do that with an iFrame but you could use Ajax.

See the this Q&A for reference, and this:

$.ajax({
  url: 'http://www.somesite.com/',
  type: 'GET',
  success: function(res) {
    $(res.responseText).find('div.content').each(function(){
      $('#here').append($(this).html());
    });
  }
});

You would then need to parse out the specific element you wanted to target.

Community
  • 1
  • 1
Philip Kirkbride
  • 21,381
  • 38
  • 125
  • 225