Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

firefox cache loses the "disabled" attribute on html tags

  • 1 antwurd
  • 1 hat dit probleem
  • 22 werjeftes
  • Lêste antwurd fan cor-el

more options

If you load a form with a submit button set to "disabled", and then some javascript removes the "disabled" attribute, if you ctrl-r refresh the page the disabled attribute is missing from the refreshed page.

Here is a minimal repro case. Load the page, note the button is grayed out, when asked "remove disabled attribute?" click "ok", then reload the page, and *don't* remove the disabled attribute. The button should be disabled, but isn't.

<html> 
<head>
	<script type="text/javascript">

	function removeDisabledAttribute(){
		if (confirm("remove disabled attribute?")){
			document.testform.searchbutton.disabled = false;
		}
	}
	</script>
</head>

<body onLoad="removeDisabledAttribute();">

	<form name="testform">
		<input type="text">
		<button type="submit" disabled="disabled" name="searchbutton">Search</button>
	</form>

	<br>
	<a href="http://www.google.com">go to google and come back</a>

</body>
</html>
If you load a form with a submit button set to "disabled", and then some javascript removes the "disabled" attribute, if you ctrl-r refresh the page the disabled attribute is missing from the refreshed page. Here is a minimal repro case. Load the page, note the button is grayed out, when asked "remove disabled attribute?" click "ok", then reload the page, and *don't* remove the disabled attribute. The button should be disabled, but isn't. <br /> <pre><nowiki><html> <head> <script type="text/javascript"> function removeDisabledAttribute(){ if (confirm("remove disabled attribute?")){ document.testform.searchbutton.disabled = false; } } </script> </head> <body onLoad="removeDisabledAttribute();"> <form name="testform"> <input type="text"> <button type="submit" disabled="disabled" name="searchbutton">Search</button> </form> <br> <a href="http://www.google.com">go to google and come back</a> </body> </html></nowiki></pre>

Bewurke troch cor-el op

Alle antwurden (1)

more options

A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25