I have a script that has an Iframe with the source of foo.php.
I also have 5 links on my page that when clicked trigger a javascript function to change the source. The only issue is that after I click on one link and it changes the iframe, the next time I click on a link it doesn't change anymore.
Here is the javascript:
<script>
function changeSource(newSource) {
parent.sec1.document.location=newSource;
}
</script>
and here is the html:
<a href="#calandar" onclick="changeSource('http://www.example.com/view.php')">Calandar</a><br />
<a href="#facebook" onclick="changeSource('http://www.facebook.com')">Facebook</a><br />
<a href="#gmail" onclick="changeSource('http://www.gmail.com')">Gmail</a><br />
<a href="#reddit" onclick="changeSource('http://www.reddit.com')">Reddit</a><br />
<a href="#twitter" onclick="changeSource('http://www.twitter.com')">Twitter</a><br />
</div>
<div id="sec1">
<iframe src="view.php" name="meat" width="100%" height="75%" ></iframe>
</div>
Thanks.