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>
"Actually firefox is stupid that way." - yes it is.
Another way would be to set autocomplete="off" on the input
HTMLFormElement
instances inherit areset
method.It can be used to clear all forms to its default values:
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.for this problem add
attr to input tag for example:
You can use Ctrl+Shift+R command to force reload (not from cache) (see Page Navigation Shortcuts on http://www-archive.mozilla.org/docs/end-user/moz_shortcuts.html)
Firefox isn't stupid that way. That's appropriate behavior because presumably the div your fading in occurs on an event e.g. onclick, onchange, etc. And since that event isn't triggered on refresh firefox has no reason to show your div. It's your responsibility to write the js necessary to trigger events onload or when document is ready.
Back to topic: a simple solution is to set the autocomplete attribute of your form to 'off'
That's it.