Forum Moderators: open

Message Too Old, No Replies

help onload

         

bodycount

1:56 pm on Jun 6, 2008 (gmt 0)

10+ Year Member



This seems to work in IE but not in firefox. can anyone see a problem?

<html>
<head>

</head>
<script type="text/javascript">
window.onload = function ()
{
history.go(-1);
}
</script>
</head>

The button works and goes back a page

<body>
<input type=button value="Back" onClick="history.go(-1)">
</body>

FranL

1:23 pm on Jun 9, 2008 (gmt 0)

10+ Year Member



You've got text between the head and body which is invalid and you've got two </head> tags.

I cleaned this up and it worked:

<html>
<head>
<script type="text/javascript">
window.onload = function () {
history.go(-1);
}
</script>
</head>
<body>
The button works and goes back a page
<input type=button value="Back" onClick="history.go(-1)">
</body>