Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Aperture

macrumors 68000
Original poster
Mar 19, 2006
1,876
0
PA
I'm trying to make an iFrame to display a piece of a website on another page. The problem is that the piece of the site that I would like to display is in the center of the page. Is there a way to define XY coordinates in the iFrame so it doesn't automatically choose the top left corner of the page?
 
You can supposedly use JavaScript to set it. You would use code like

PHP:
window.frames['anchor_iframe'].document.body.scrollTop = anchorPos;

to get it done. I've never tried it myself though.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.