Forum Moderators: open
I'll give an example:
Say I wanted to put an iframe of webmasterworld.com on a page, but have the iframe sized to only show the "Forum Index" text at the top left...how would this be done?
Thanks!
<a name="start-here"></a>
Then use that in the source attribute of your iframe element on the calling page:
<iframe src="frame-target#start-here" height="50px" width="100px" scrolling="auto">
You'll probably have to play around with this a bit and test the dimensions in different resolutions but should be able to get it to work.
I need to put the iframe around a certain number on the site's highscores. This number is constantly updating so the only way I could think of, without having to update the number by hand which would be a big pain and I wouldn't be able to do it 24/7, would be to put an iframe around that number. The image is right next to that number. It wasn't the image that I wanted, just thought maybe I could somehow use the class tag on it to direct the iframe there.
I mean, something like the positioning of a page in an iframe doesn't seem like it would be that hard, but I've searched around for a while and can't find a solution to it. Possibly I'd have better luck using Javascript/DHTML soemhow?
iframe trick they could use a frame-busting script to replace your site with theirs in the user's browser, thus hijacking all your traffic. :) If you do have the permission of the site owner, ask whether they would publish the information via RSS - then you can just parse the feed and your site will be updated autmatically. Another option is to regularly fetch the page via a server-side process (eg. with cURL), write a script to identify the container surrounding the information you require, then extracting this container and inserting it in your page. Obviously, both of these approaches require server-side scripting such as PHP, ASP, Perl...