Rafael
|
Posted: 05/27/2004, 6:13 AM |
|
Hi,
I have a problem with the ListBoxt Control in my search box.
The Table in my BD is:
OFERTAS
========
CODIGO (Number) Key
DESCUENTO (Boolean)
I use the ApplicationBuilder to build the search page, and, I change the control type of DESCUENTO field in the search form.
I have done this because if i use the CheckBox, the search form cannot find records with DESCUENTO field set to FALSE. If the check is marked, it searches the TRUE values, but if it's NOT marked, it's searches ALL values.
I think that better solution is show a ListBox (ComboBox) with three values ( Select one value / Yes / No ). If the user select "Select one value" the page "List" show ALL values (true and false). If the user select "Yes" the page "List" show al true values. Finally, if the user select "No" the page "List" show all false values.
Then, i change the type of DESCUENTO field to ListBox, 2 new values (1/Yes and 0/No)
And....the page dont works!!
HTML Code retrieve from asp SEARCH FORM page:
<select name="s_DESCUENTO">
<option value="">Seleccionar Valor</option>
<OPTION VALUE="" SELECTED>Sí</OPTION>
<OPTION VALUE="" SELECTED>No</OPTION>
</select>
NOTE: All values are "" and SELECTED ¿¿¿¿WHY???
The CODE generated with CodeCharge Studio seems be OK. It's this:
ASP CODE generated with CodeCharge Studio for SEARCH FORM page:
OFERTASSearch Class_Initialize Event
===============================
...
...
Set s_DESCUENTODataSource = CCCreateDataSource(dsListOfValues, Empty, Array( Array("1", "0"), Array("Yes", "No")))
Set s_DESCUENTO = CCCreateList(ccsListBox, "s_DESCUENTO", "s_DESCUENTO", ccsBoolean, CCGetRequestParam("s_DESCUENTO", Method), s_DESCUENTODataSource)
...
...
Any idea? Any suggest???
Best regards....
|
|
|
|