Streaming live at 10am (PST)

Embed Code Inquiry


#1

Is it possible to only embed a certain portion of an external webpage? Say there is a certain section on page and I only want to embed that section, not the whole page, how would I go about doing so?


#2

iframe if from external domain, jQuery.load() if same domain.


#3

iframe will let me grab only a certain section? Not the whole page?

Would something like this work?

What would i make the link if im only trying to pull one individual section @samliew ?

Thank you for the quick response! :slight_smile:


#4
<iframe src="link here" height="1300" frameborder="0" width="100%" scrolling="yes" overflow-y="hidden"></iframe>

#5

Oh, if only a certain portion of the page, you will have to write PHP or some server-side code as a proxy to fetch and parse and return only the portion you want.

Otherwise, it's best to liaise with the site to get them to create a partial page for you to iframe.

In short, if you don't own the page, JavaScript is unable to do it due to security sandboxing.


#6

Sorry, what I meant was, no easy way to do it because it is disabled by default.

Here is what you need if you want to do a cross-site scripting:

http://stackoverflow.com/q/15005500/584192
http://stackoverflow.com/q/29360797/584192

(note that you may still need to do some kind of server hacking)