I have an index.html file that has an iframe in it. The iframe’s initial content is main.html. In the index.html file, there is primary navigation at the top, which consists of around 7 different objects. When you click on each of them, the iframe is populated with a new html file via a javascript function like so:
<a href="#" onclick=populateFrame('main.html')><img src="images/main_menu.jpg" alt="Main Menu" width="110" height="62" border="0" /></a>
The javaScript function is set up like so:
function populateFrame(parameter){
frames['iframe'].location.href = parameter;
}
Now, let’s say that the iframe is currently populated with main.html, but within main.html there are links that when clicked, the iframe needs to be populated with a new file, which is whatever was clicked on. So essentially, with main.html already in the iframe, when a link within main.html is clicked, main.html itself needs to be swapped with the “clicked” file (i.e., one.swf or one.html).
Any ideas as to how I can accomplish this with the given javaScript function? Thanks!
JPearson311