Solved

Embedding a website within a website, and having it stay there

Posted on 2009-05-11
2
640 Views
Last Modified: 2012-05-06
A previous question/solution shows how to embed one website within another.  I have a similar situation, but the previous solution doesn't work to the extent I need.

I want to offer visitors to my site the opportunity to play around with a beta website, and then I want to ask them a few questions about what they think.  I want to embed the beta site on a page and have them be able to move around all they want on the embedded site without ever leaving the original site.  Using the previously provided solution, as soon as a link is clicked on the embedded webpage, the entire browser window goes to the clicked link.  I need people to stay put in the main "window" while they are free to surf around the "inner" window.  Hopefully that makes sense.

Thanks ahead of time!

TLG
0
Comment
Question by:TheLinkerG
2 Comments
 
LVL 12

Expert Comment

by:alien109
ID: 24356961
as long as your links aren't targeting _top or _parent you should stay in the iframe. can you show the implementation that isn't working for you?
0
 
LVL 1

Accepted Solution

by:
TheLinkerG earned 0 total points
ID: 24380564
Well, I think I've answered my own problem.  

Alien109, I was NOT targetting anything.  The IFRAME I was using looked like this:

<iframe src="http://www.espn.com" width="800" height="600"></iframe>

It looked fine at first, but as soon as I clicked a link it took over the entire window.  Since I'm going to be showing a mocked-up website that I control, I was able to fix it by modifying that code:

<iframe name="subwin" id="subwin" src="http://www.espn.com" width="800" height="600"></iframe>

In the mocked-up html, every link includes target="subwin" and that seems to work fine.  Anybody know how to fix it if I can't control the link targets?

Thanks again in advance... again...

TLG
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
remove border from element 5 78
Widget to get customer remakrs in our website. 3 75
When should I use a controller? 3 34
Create animated movies for web page 17 38
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question