Issue
I'm just starting to learn internet programming.
After playing around with checkboxes, I found out the hard way, that it is only when the checkbox is checked that it transmits an 'on' value.
Why not also send an 'off' value?
Solution
I think it must be for brevity of transmission. Each request to the server is sent 'over the wire' if you've got a page with thousands of checkboxes on it, you will find that the amount of data to tell the server "this box is off" is actually quite sizeable (seeing as how you'd have to send the NAME of each checkbox element - that could add up to megabytes of information - which would slow the entire user experience & internet down).
Whereas in fact you know that it is off by virtue of it not being sent - so there's no need to send it.
Answered By - Alex C
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.