Search code examples
htmlfirefoxasp-classic

Refresh problem in Firefox


In my asp page there is one textbox name "ProductName"

if i write any thing in that textbox and refresh that page , textbox is not clear in firefox. But i open this same page in Internet explore and write any thing in textbox and refresh the page, my textbox comes clear

why textbox not comes clear in FireFox?

This is the html code

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<input type="text" id="ProductName" name="ProductName" style="width:235; height:20" value="">
</body>
</html>

Solution

  • This is a feature of Firefox (one I'm quite fond of). There's nothing you can do about it on the server-side.

    EDIT:

    The longer version: There is something you can do about, but it's very messy. Basically, the way Firefox implements this is it refills in form elements with the same name when the user hits the refresh button.

    The workaround is to change the name attribute on your HTML form elements every time the page loads. How you keep track of what you change them too is left to your discretion, but let me just say that as a Firefox user myself, having a website do this would annoy me no end.