Hi..! i have 2 files in a folder "form.php" "thankyou.php" after filling the form, user ir redirected to thankyou, but, if we click browser's BackTo button, the filled details are remaining in the fields. How to reset the form when clicking "Back".
This code i tried.... but no use

<!-- //
    function ClearForm(){
        document.MyForm.reset();
    }
    // -->

Put one alert to your javascript function, just to test if it is called at all.

And try to add some timeout for script execution into body page where you have your form:

<body onload="self.setTimeout('ClearForm()', 500)">
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.