webminal.org
webminal.org

Reputation: 47196

How to embed other websites via iframe / ahref?

I have html site - i would like to do the following

-----------------------------
Link1 website1     | 
Link2 website2     | Mysite
Link3 website3     |
-----------------------------

As you can see, on right side, content will be static - Its from my website.

On left side there is 3 links (a href) - which point to three different domain.

Now how to ensure, when I click on link1, website1 content displayed

---------------------------------
            | 
Website1    | Mysite
            |
---------------------------------

If link2 clicked, Website2 content will be displayed.

bonus question : Embedding other site like this way , cause any security threat to my site?

google gave me this :

see here

but its little different from my requirement

Upvotes: 0

Views: 18509

Answers (1)

Ramtin Gh
Ramtin Gh

Reputation: 1050

You should first give your iframe a name, then target your links to that iframe

Example:

<iframe src="external.htm" name="iframe"></iframe>
<a href="http://stackoverflow.com" target="iframe">SO</a>

References:

Upvotes: 5

Related Questions