| 1. |
Solve : HTML - Open link and display specific content in the next frame? |
|
Answer» Hello, <a href="./articles.php">Article Number One[/url] articles.php is hyperlinked as the same php code for Article 1 and 2, so curious what your php code is to differentiate a user clicking on Article 1 vs 2. The way I see this you get the same RESULT from clicking either link, so knowing what your php code is doing is needed for us to help further. Quote <iframe src="./articles/article_viewer" frameborder="0" width="75%" height="100%" name="articles_viewert"></iframe> Knowing what your php is doing we can better assist with this. There is a lot of dynamic HTML that is going on with your php or should be going on in your php to display what you want. Hi thanks for the reply Ignore the fact that they're PHP pages, they're currently empty and could be HTML pages, i'm not too concerned about that. Just to clarify, what i'm AIMING to do is this: 1. I have a page called Home which contains links to my articles, lets say: Article 1 Article 2 2. When I click on one of the articles (lets say Article 2) it directs me to a new page called "Articles" and opens up the code in a on that page called article_content.html. Thanks,You would need to have some sort of URL parameter so the link to article one would be along the lines of "articles.php?article=article-one" then have something in article.php that reads this parameter and loads the correct article into the iFrame. It would be helpful if you explained what the actual project is in more detail and why an iFrame is required. Using iFrames in this way is seen as very outdated and is generally classed as bad practice. Iframes should only be used when there is a good reason to (e.g. including a piece of content from another website such as when embedding a video), they shouldn't be used as general page layout elements or anything like that. |
|