I read an earlier post about paging through some html pages using an array in javascript, but I was unable to find the post again. However, this is what I have:
Code:
<script type="text/javascript">
var x = 0;
var midpage = new Array("adtable.html", "nothing.html", "nothing.html");
function changePage()
{
var y = "";
document.getElementById('adtable') = y;
if (x==2)
{
x = 0;
} else {
x = x + 1;
}
y.src = midpage[x];
}
</script>
and then my IFrame:
Code:
<iframe id="adtable" name="adtable" src="adtable.html" height=202 align="center" width="100%" marginheight=0 marginwidth=0 scrolling="no" frameborder=0>
NO WORKY!!!
</iframe>
When I click one of these buttons:
HTML Code:
<a class="inline-button" onClick="changePage()">Right</a>
Nothing happens.
By the way, I am testing this in the newest version of Firefox.
Any help is appriciated, sorry if this is double post.