Forum Moderators: open
Not sure what this means:
>>without saving info on that page
For example... Click "Reply to this topic", start typing, click "Back", click "Forward"... Whatever you typed is now "saved".
Why do you want to disable that? I'm not sure if onload will help or not... Or perhaps a timer? Or perhaps check the window history to see if there are pages after the current one (meaning -- they've clicked "Back"). If so, clear the fields...
<html><title>Blah!</title>
<head>
<script language=javascript>
<!--
function clear()
{
document.testform.box1.value="";
document.testform.box2.value="";
}
//-->
</script>
</head>
<body onLoad=clear()>
<form name=testform>
<input name=box1 type=text><br>
<input name=box2 type=text>
</form><input type=button onClick=history.back() value=Back></body></html>
I think that will do it. I think the onLoad function executes even if you are using a back button.