views:

154

answers:

4

I'd like to load something from website B into a page on website A and contain the functionality of website B within a container on website A.

I tried doing this using a div and jQuery's load() method but I run into cross-domain-scripting issues (I think, it works with a local file but not a remote URL).

I also tried using an iframe but strange things happen (for example, when a link is clicked in the "contained" website B, it reloads the entire browser, losing the content of website A).

I've read about some server-side ways of handling this (and it may just come to that) but ideally I want something completely client side, JavaScript and HTML.

Any ideas?

+1  A: 

Do you have any contact or privileges to the content of website B? I don't think this is legal.

Contacting the authors of website B isn't an option to work out some agreement?

More info on website copyright

Rick de Graaf
The sites I plan to access are intended to be used this way (I'd elaborate further but I want to get a proof-of-concept working before I disclose much more).Long story short, I have no intention of accessing any site this way if they don't want me to.
jasongullickson
Both above named websites have a lot of help for implenting their features in your own website. I'm getting the idea that what you want is possible, but through another way... if we had more information (although I can understand that you're not telling us)...
Rick de Graaf
Thank-you for the helpful response.Hopefully soon I'll have proven enough of the theory to be comfortable sharing the details.When I do find a complete solution to the task at hand I'll be sure to post the results.
jasongullickson
A: 

What you are explaining ......... it looks like the site has XSS validations for attack....... I am not sure if you are aware about the seriousness of this iframe trick but it is one of the ways in which Phishing is done.

So please be aware and careful of what you are doing

Anil Namde
I'm not sure I follow you, but in the testing I've done so far the remote sites I've been hitting (other than my own) are Google and Facebook.
jasongullickson
A: 

If you are working with people who want this, then website be should be working with you. I saw your whining on hacker news and frankly no one is giving an answer because no one wants you to do this. We are people, not robots. You would have to answer as to why any user would want this.

Jonathan Kaufman
A: 

I am looking for the same functionality. We have an internal site A. We have another internal application B existing on another server. The users want a type of "dashboard", where from within site A is embedded application B. Application B is fully functional within site A and its frame/container/whatever is dynamically resized.

Joe