browers".
It just seems that both IE and Firefox are "too merciful" to web development
testing.
There's a sample code to be run on "onclick" event of checkbox that has been
hidden in our code 1 year, and go pass the QC by both IE and Firefox without
complain:
function toogleCheckBox(chk) {
if (chk.checked == true) {
chk.value = '1';
} else {
chk.value = '0';
}
}
It's quite obvious that by design, the checkbox control's value should
return either "on" if checked, or "" if not. And both IE and Firefox is too
mercyful to allow the "value" to be changed to anything else. Now one of our
customer used Safari, and Safari "do the right thing" to return just "on"
and "" to the server. And boom, the web application become hopelessly
broken.
I'm on my endless quest to find a browser that "just breaks" when it see
anything that "don't follow the standard"(of course, it shouldn't complain
when it see something follows the standard). Now it seems that Safari is a
close one...
I'll be grateful if I see in IE 7, they add a switch to close all the
"mercy" features. Until then, I can be reassured that any code passed the QC
does meet the standard and I can take a rest with confidence.Lau,
Its not obvious to me that the checkbox returns 'on' and "".
Good Luck
DWS
"Lau Lei Cheong" wrote:
> This is to be refered to my many-months-ago previous most on "mercyful
> browers".
> It just seems that both IE and Firefox are "too merciful" to web development
> testing.
> There's a sample code to be run on "onclick" event of checkbox that has been
> hidden in our code 1 year, and go pass the QC by both IE and Firefox without
> complain:
> function toogleCheckBox(chk) {
> if (chk.checked == true) {
> chk.value = '1';
> } else {
> chk.value = '0';
> }
> }
> It's quite obvious that by design, the checkbox control's value should
> return either "on" if checked, or "" if not. And both IE and Firefox is too
> mercyful to allow the "value" to be changed to anything else. Now one of our
> customer used Safari, and Safari "do the right thing" to return just "on"
> and "" to the server. And boom, the web application become hopelessly
> broken.
> I'm on my endless quest to find a browser that "just breaks" when it see
> anything that "don't follow the standard"(of course, it shouldn't complain
> when it see something follows the standard). Now it seems that Safari is a
> close one...
> I'll be grateful if I see in IE 7, they add a switch to close all the
> "mercy" features. Until then, I can be reassured that any code passed the QC
> does meet the standard and I can take a rest with confidence.
>
Maybe, but that's how brower tell the server-side code the state of
checkboxes and radiobuttons.
(By returning "on" or "" in Request data stream.)
"DWS" <DWS@.discussions.microsoft.com> glsD:38C53FFA-D212-4B36-93C4-A7048A3D0461@.microsoft.com...
> Lau,
> Its not obvious to me that the checkbox returns 'on' and "".
> Good Luck
> DWS
>
> "Lau Lei Cheong" wrote:
>> This is to be refered to my many-months-ago previous most on "mercyful
>> browers".
>>
>> It just seems that both IE and Firefox are "too merciful" to web
>> development
>> testing.
>>
>> There's a sample code to be run on "onclick" event of checkbox that has
>> been
>> hidden in our code 1 year, and go pass the QC by both IE and Firefox
>> without
>> complain:
>>
>> function toogleCheckBox(chk) {
>> if (chk.checked == true) {
>> chk.value = '1';
>> } else {
>> chk.value = '0';
>> }
>> }
>>
>> It's quite obvious that by design, the checkbox control's value should
>> return either "on" if checked, or "" if not. And both IE and Firefox is
>> too
>> mercyful to allow the "value" to be changed to anything else. Now one of
>> our
>> customer used Safari, and Safari "do the right thing" to return just "on"
>> and "" to the server. And boom, the web application become hopelessly
>> broken.
>>
>> I'm on my endless quest to find a browser that "just breaks" when it see
>> anything that "don't follow the standard"(of course, it shouldn't
>> complain
>> when it see something follows the standard). Now it seems that Safari is
>> a
>> close one...
>>
>> I'll be grateful if I see in IE 7, they add a switch to close all the
>> "mercy" features. Until then, I can be reassured that any code passed the
>> QC
>> does meet the standard and I can take a rest with confidence.
>>
>>
>
0 comments:
Post a Comment