I’ve been asked to look into building a widget for a website that looks at the content of the page its on and then displays relevant search results. My approach would be to use either the meta keywords or to do a count of words used within the document and use the highest occurring ones. Before I can do any of that though, I need to be able to get at the content of the containing page from the iframed page; is this at all possible? From what I can see it is not and I can only get the document referrer (where there might be useful information in the url I suppose).
Anyone know if this is at all possible?
As stated in my comment on the OP, due to XSS (cross site scripting) restrictions broswers will block any attempt to do anything (whether reading or writing) between sites on different domains.
So the answer is no, you will not be able to do what you’ve been asked by your clients.
The most you would be able to get is referal information, or (as you say) any information provided via the query string that the host site is willing to provide