Question

Trying to load a page fragment, or at least jump to a div but with no joy.

<iframe src="http://myurl.com/#property_details" width="300" height="300">  

    </iframe>

but the iframe does not skip to the requested div, it simple loads the whole page, scrolled to the top.

Was it helpful?

Solution

Don't think its possible to do it in such way. Another possibility to do this is using a div of which the content is set to the #property_details by using an Ajax call.

This could maybe help: http://frinity.blogspot.com/2008/06/load-remote-content-into-div-element.html. In the example the whole html of the page is used, but a selection of what you would like to insert is possible by adding some jQuery selection over the data before.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top