ckennerdale
Programmer
I am trying to set up histiry buttons, providing back and forward functionality, controlling another frame.
I can get it to work in both IE and NS, but when I try to combine code for both browsers into a function call LoadVars() - see below, it doesnt work, However I have used this technique before with success- although not with history.
Any ideas?
The code below is the frame containing the buttons-
<html>
<head>
<title>Untitled Document</title>
<script>
function LoadVars(){
if (navigator.appName == "Netscape"{
window = parent.frames[0];
}
else{
window;
}
}
function goBack()
{
window.history.back();
}
function goForward()
{
window.history.forward();
}
</script>
</head>
<body bgcolor="#FFFFFF" onLoad="LoadVars()">
<br>
<br>
<br>
<a href=javascript:goBack();>back</a>-
<a href=javascript:goForward();>forward</a>-
</body>
</html> Caspar Kennerdale
Senior Media Developer
I can get it to work in both IE and NS, but when I try to combine code for both browsers into a function call LoadVars() - see below, it doesnt work, However I have used this technique before with success- although not with history.
Any ideas?
The code below is the frame containing the buttons-
<html>
<head>
<title>Untitled Document</title>
<script>
function LoadVars(){
if (navigator.appName == "Netscape"{
window = parent.frames[0];
}
else{
window;
}
}
function goBack()
{
window.history.back();
}
function goForward()
{
window.history.forward();
}
</script>
</head>
<body bgcolor="#FFFFFF" onLoad="LoadVars()">
<br>
<br>
<br>
<a href=javascript:goBack();>back</a>-
<a href=javascript:goForward();>forward</a>-
</body>
</html> Caspar Kennerdale
Senior Media Developer