Kërkoni te Asistenca

Shmangni karremëzime gjoja asistence. S’do t’ju kërkojmë kurrë të bëni një thirrje apo të dërgoni tekst te një numër telefoni, apo të na jepni të dhëna personale. Ju lutemi, raportoni veprimtari të dyshimtë duke përdorur mundësinë “Raportoni Abuzim”.

Learn More

firefox cache loses the "disabled" attribute on html tags

  • 1 përgjigje
  • 1 e ka hasur këtë problem
  • 22 parje
  • Përgjigjja më e re nga 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>

Ndryshuar nga cor-el

Krejt Përgjigjet (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