CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Why do numberic check boxes have text value "on"?

Print topic Send  topic

Author Message
Brent
Posted: 03/27/2002, 1:12 PM

I have a couple of check boxes for a search form that aren't assigned to a
field from the table. When I press Search the url gets constructed as
"&field1=on" even though the checkbox is defined as a number.

1) Why is it using "on" instead of "1" or "0"?

When the form gets refreshed, the url parameter is there (&field1=on) but the
check box is unchecked in the search form.

2) Is there something special I have to do in order to get checkboxes to work properly on a search form?

TIA
Brent
Posted: 03/27/2002, 1:27 PM

Ok, it looks like I have to define the field as Text and use "on" as the checked
value and blank as the unchecked value for it not to clear the checkbox
when the page is refreshed.

It looks to me like a bug. The passed value should
be 1 if the checked value is 1 and the field is numeric. For some reason CC
only allows "on" to be passed and of course if the field's checked value is
defined as 1 instead of "on", it won't check the check box because 1<>"on".
CC always exepects the value to be "on". :(
Nicole
Posted: 03/28/2002, 1:09 AM

Brent,
inspite of checkbox field on Search form has option for checked and unchecked value, if it checked "on" is passing and if it's unchecked nothing is passing.
It's HTML feature, not CC. To implement search on CheckBox field you should replace pased "on" value with the appropriate real value.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.