Hello,
Here is my code to change iframe src after x seconds.
I need help to modify it so, when Page2 has loaded, user cannot return to Page1.
Here is the code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MyFile</title>
<script type="text/javascript">
var frames = Array('http://www.mydomain.com/files/Page1', 55,
'http://www.mydomain.com/files/Page2');
var i = 0, len = frames.length;
function ChangeSrc()
{
document.getElementById('frame').src = frames[i++];
if (i >= len) return; // no more changing
setTimeout('ChangeSrc()', (frames[i++]*1000));
}
window.onload = ChangeSrc;
</script>
</head>
<body>
<iframe src="" name="frame" id="frame" width="100%"height="100%></iframe>
</body>
</html>
Here is my code to change iframe src after x seconds.
I need help to modify it so, when Page2 has loaded, user cannot return to Page1.
Here is the code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MyFile</title>
<script type="text/javascript">
var frames = Array('http://www.mydomain.com/files/Page1', 55,
'http://www.mydomain.com/files/Page2');
var i = 0, len = frames.length;
function ChangeSrc()
{
document.getElementById('frame').src = frames[i++];
if (i >= len) return; // no more changing
setTimeout('ChangeSrc()', (frames[i++]*1000));
}
window.onload = ChangeSrc;
</script>
</head>
<body>
<iframe src="" name="frame" id="frame" width="100%"height="100%></iframe>
</body>
</html>