BillyRayPreachersSon
Programmer
Can anyone tell me whether selected & disabled <option> elements should be included when serialising a form?
I thought the answer would come easily from checking out the behaviour of some JavaScript frameworks, yet they differ in their behaviour.
Prototype 1.7.0.0 does serialise them, but jQuery 1.7.2 does not. I've put together a test page here where you can see the results: [URL unfurl="true"]http://jsfiddle.net/CodeCouch/YR263/[/url]
I thought I'd refer to the WHATWG documentation on the FormData object, but it only talks about selected options or disabled options - never when an option is both selected and disabled.
I guess there's no "right" answer, and ultimately I should run with whichever behaviour suits my needs... but it would be nice to know what the general consensus is on this.
Thanks!
Dan
Coedit Limited - Delivering standards compliant, accessible web solutions
[blue]@[/blue] Code Couch:
[blue]@[/blue] Twitter:
I thought the answer would come easily from checking out the behaviour of some JavaScript frameworks, yet they differ in their behaviour.
Prototype 1.7.0.0 does serialise them, but jQuery 1.7.2 does not. I've put together a test page here where you can see the results: [URL unfurl="true"]http://jsfiddle.net/CodeCouch/YR263/[/url]
I thought I'd refer to the WHATWG documentation on the FormData object, but it only talks about selected options or disabled options - never when an option is both selected and disabled.
I guess there's no "right" answer, and ultimately I should run with whichever behaviour suits my needs... but it would be nice to know what the general consensus is on this.
Thanks!
Dan
Coedit Limited - Delivering standards compliant, accessible web solutions
[blue]@[/blue] Code Couch:
[blue]@[/blue] Twitter: