The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How do I use js/php to switch between lines of code in a html doc!

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #145741

    Okay, my first post here. I’m very new to code but a quick learner (I’m told).
    I try to be as clear as possible, in describing what I’m looking for.

    I would like to have one page, lets say index.html. On this page there will be some navigation links.
    What I would like to happen when a link is clicked, is for an iframe or similar to load in the main content area of the index.html and for that iframe to be called from the index.html page. If I click another link on the page another iframe to be called and replace the previous iframe.
    I have seen similar sites like the (one page website) but that type of site always seems to have multiple html pages.
    Also I looked at this and wondered if there is a function I could use to switch the iframes out when a link is clicked.

    Thanks for your time,


    Roy Hollister


    Okay, I found a way…found this on code pen and made changes.

    Nice and easy in the end.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.