I am trying to change iframe
link using java script but script is not working.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<iframe name="pageChange" src="about:blank" width="1300" height="1300" scrolling="auto" frameborder="1" onload=pageChange></iframe>
<script type="text/javascript">
var pages=new Array();
pages[0]="http://valuewingcoe.com";
pages[1]="http://www.link2.com";
pages[2]="http://www.link3.com";
pages[3]="http://www.link4.com";
var time=7000; // this is set in milliseconds
function pageChange() {
var rand=Math.floor(Math.random()*pages.length);
document.getElementById("frame").src=pages[rand];
setTimeout("pageChange()",time);
}
onload=pageChange;
</script>
</body>
</html>