views:

45

answers:

4

I was wondering if there was anyway I could make another browser within my webpage. Basically I want this browser to be an interactive area on my webpage (about half the page).

The main page should be able to detect where every click was made within the mini browser.

Is there some apis that would help me out? Or would my best bet be to stream a remote desktop?

A: 

You could try the <iframe> tag.

cfeduke
+1  A: 

You can embed another page within yours using an <iframe>. Once you do, however, you can't control much of what happens within it, or detect where clicks are made, unless the page within the iframe is from the same domain, for security reasons.

Brian Campbell
A: 

No, it really can't work that way. My suggestion would be to embed an iframe and then control it using JavaScript. However, you won't be able to control it very well (like, for example, limiting where the user can browse with it).

SimpleCoder
+1  A: 

Programming your own browser engine in Javascript will take you years, and it will inevitably be slow, cumbersome, and prone to errors. Furthermore, your Javascript cannot really have direct access to other website's HTML code, it will have to go through your own server anyway.

You can use an

<iframe>

tag. To detect clicks and mouseovers, you could transform the HTML on your server first, potentially adding "onclick" events. This would let you have XSS access too, and cookie control.

dionyziz