0

i'm trying to make a nav bar with the contents below in an iframe and i'm wanting the nav bar buttons when clicked to load a page in the lower iframe.

The iframe and main page will be on the same server // domain, so i was wondering if anyone could recommend something ?

I had a lil Google and found this: iframe click link it opens in parent page rather than in iframe page

and tried changing parent to child but it didn't work.

1 Answer 1

1

Considering an iFrame with name attribute of foo.

<iframe name="foo" src="index.html"></iframe>

Use a link with target foo.

<a href="about.html" target="foo">About</a>

Should work as expected.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.