0

So what I've got is a page which will show a video with comments (similar to youtube). I dont want to reload the entire page when browsing through comments - and I really dont want to do the "show more" like we see on disquss. I want to break it into pages.

So I could do the video page with an iframe which contains the page of comments and users swap pages through the iframe. However, I'd prefer if the iframe didnt have its own scroll bar and it simply made the parent window change sizes.

I want people to be able to watch the video while browsing comments which is why i dont want the entire page to refresh when they go to a new comments page.

So is it possible to make an iframe which resizes itself based on the document size of the iframe?

  • It depends on whether the content in the iframe is from the same origin or not. See [Resize iframe height according to content height in it](http://stackoverflow.com/questions/525992/resize-iframe-height-according-to-content-height-in-it). – Antony Mar 25 '13 at 05:18

1 Answers1

1

Why not just use jQuery's $.load() function to load comments into a div? Then you'll have full control over the layout.

bluemoonballoon
  • 299
  • 1
  • 2
  • 8