Solved

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

Posted on 2009-05-11
2
637 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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.
Read about why website design really matters in today's demanding market.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

760 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now