I'm sure it's a simple fix.
I am taking an intro to JavaScript class online - the professor is completely disengaged and doesn't respond to email, Blackboard notes, anything. FML and FMT (tuition).
Anyway, I have a page that looks like this:
After I click on a link in the content div to bring up a page in the iframe, if I try to click on a link back in the navigation div, it opens in the iframe.
I'm sure I'm supposed to somehow use "target" but no matter where I put target and no matter if I put _self or _top or _parent the links outside the iframe keep opening inside the iframe after I click on a link that is supposed to go in the iframe.
Here's the Javascript
Solving this very simple problem will grant you instant access into Heaven.
Thanks!
I am taking an intro to JavaScript class online - the professor is completely disengaged and doesn't respond to email, Blackboard notes, anything. FML and FMT (tuition).
Anyway, I have a page that looks like this:
Code:
<div id="wrapper">
<div id="navigation">
links
</div>
<div id="content">
links to other pages that go in the if ram below
[iframe here]
</div>
</div>
After I click on a link in the content div to bring up a page in the iframe, if I try to click on a link back in the navigation div, it opens in the iframe.
I'm sure I'm supposed to somehow use "target" but no matter where I put target and no matter if I put _self or _top or _parent the links outside the iframe keep opening inside the iframe after I click on a link that is supposed to go in the iframe.
Here's the Javascript
Code:
window.onload = initLinks;
function initLinks() {
for (var i=0; i<document.links.length; i++) {
document.links[i].target = "icontent";
}
}
Solving this very simple problem will grant you instant access into Heaven.
Thanks!