adisa230 / webforms2

Automatically exported from code.google.com/p/webforms2
0 stars 0 forks source link

Required class="disabled" in Firefox to keep templateElements disabled #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Firefox will remember the input values and the element disabled states
which were dynamically set after a page reload or after returning to a page
via the back/forward navigation controls. This destroys the ability to set
a defaultDisabled property on each templateElement on the basis of the
elements disabled value, since all remplateElements are disabled on
DOMContentLoaded to prevent them from being 'successful'.

A workaround requiring authors to additionally include a className of
'disabled' on all disabled elements within the repetition template.

See discussion at Gervase Markham's blog for more info:
<http://weblogs.mozillazine.org/gerv/archives/2006/10/firefox_reload_behaviour.h
tml>

Original issue reported on code.google.com by WestonRuter on 15 Aug 2007 at 3:37

GoogleCodeExporter commented 8 years ago
I read the discussion and another workaround is to send http header 
Cache-Control:
no-store from server side. This forces firefox to reset form data.

https://bugzilla.mozilla.org/show_bug.cgi?id=46845#c186

Thanks for your incredible effort to write this implementation! :)

Original comment by iharosi....@gmail.com on 26 Sep 2007 at 1:20