Michael
Michael

Reputation: 3

External Navigation for navigating inside an iFrame

After all the time of staying away from things like iframes, it finally caught back on me. A client wants a part of his Shop showing on his website, via iFrame.

But lets just skip right to the problem:

There is the main html site, which holds the iframe displaying the shop. Above that iframe, there is a submenu, which is supposed to open links INSIDE the iframe.

The problem is, that I don't have any clue how to do that. Is there a way of using anchors to switch / navigate sites inside an iframe?

Thanks in advance, I hope you guys can help me with this.

Upvotes: 0

Views: 7362

Answers (1)

lonesomeday
lonesomeday

Reputation: 238015

Give the iframe a name attribute (e.g. name="shopContent"). You can then make links access the iframe using the target attribute on your link element:

<a href="bananas.htm" target="shopContent">Bananas</a>

Upvotes: 5

Related Questions