Link to page, then load specific file in iframe

[i’m posting this again b/c the on the first try, i included code in my message and the forum actually displayed the code and messed up the page. i’m sorry!]

Here’s my question:

I have two links (to news article #1 & news article #2) on “index.htm”. If I could get this to work, the user would be able to click on one of the two news articles, and then a new page (“news.htm”) would load, AND THEN the article of their choice would load in the iframe (called “article”) on “news.htm.”

I have looked all over for a solution and tried a whole lot of different things, but the iframe on “news.htm” always comes up blank.

(The only way I can get the iframe to load content is by using the code iframe src=“article1.htm” on the page “news.htm”. But that doesn’t help me, because I want the user to be able to pick the article of his or her choice.)

Huge thanks to anyone who can help – I’m going crazy with this.

OK, I think I get what your trying to say. Your saying that there are two links within the html page named index.htm? If you want to link a hyperlink to another html page that pressumly would load the external article, this is what would the coding be:

<iframe name="cwindow" width=670 height=290 frameborder="no" scrolling="no" src="root.htm"></iframe>

That above defines the iframe window. Below is the attached coding to a hyperlink:

<a href="root.htm" target="cwindow">Home</a>

Does this help?

Thank you Minimalistik. I think you do get the page structure, but I will try to explain it a different way in case that helps.

The files:
:: index.htm w/two links: article1.htm & article2.htm
:: news.htm, which contains the iframe “article”
:: article1.htm & article2.htm, which are possible content for the iframe

When the user clicks on article1 or article2, i need news.htm to load, and then whichever article the user clicked on should load into the “article” iframe on news.htm.

My understanding, and what has been happening in tests, is that if I set a src for the iframe, article1.htm for example, then article1 will load in the iframe whether the user chooses article1 or article2. My challenge is to get the iframe to load whatever article the user chooses.

I’m not the most experienced in coding, but it looks like your sample code is telling the iframe to load root.htm no matter what. I need the user to be able to determine what file is loaded in the iframe.

Thank you, I really appreciate your help & your patience with me :slight_smile: