Why does checkbox return -1 and 0?

  • Thread starter Thread starter techtarget
  • Start date Start date
T

techtarget

I have a DHTML application running on IE 6.0 that has a checkbox. When
the checkbox is checked and submitted, the value on the server-side
comes in as -1 or 0 (depending on whether it is true or false).
However, when I try to alert the checkbox value on the client side
(browser) using javascript, I get the values as either "true" or
"false". I need the values to come in as true/false on the server-side.
How can I control this, and why does this happen?
 
Not sure about DHTML but in VB / VBA / Microsoft Access,
-1 = True and 0 = False. Since CheckBox is genrally a 2-
state Control, that's what you get.

Perhaps, you should post your question to an appropriate
newsgroup. This newsgroup is for Microsoft Access, a
database application and not for DHTML.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top