From reading tornados documentation it appears that SuperValidator can not be used on a field of type SELECTBOX. Is this true?
If the above is true, what is your recommendation for testing a blank SELECTBOX field.
Printable View
From reading tornados documentation it appears that SuperValidator can not be used on a field of type SELECTBOX. Is this true?
If the above is true, what is your recommendation for testing a blank SELECTBOX field.
Correct. The mpuse click drop action and the textbox type action makes it pretty impossible and when you pitch in the Netscape browser differences - it is finsihed. Use the magicValidate in this case.
FK
I've tried to use MagicValidate with no success so I'm posting a section of my code and hopefully you can give me a lead on all this.
Dim eaFlds as String = ""
eaFlds = "fi=Critical|ty=Checkbox," & _
"fi=Activity_ID|ty=SelectBox+B|te=Aindex|oper=IB|e rr=Can Not be Blank," & _
"fi=CreateID|ty=SelectBox+B|te=Cindex|oper=IB|err= Must Select A Champion," & _
"fi=CreateDate|ty=ROAdd|def=Now()," & _
"fi=Actual_Hours|tag=size=4," & _
"fi=Actual_GOE|tag=size=8," & _
"fi=ActStatus|ty=TextArea|tag=COLS=35 ROWS=6," & _
"fi=Lesson|ty=TextArea|tag=COLS=35 ROWS=6"
.dbEditAddFlds=eaFlds
thanks, paul
I'll point you to some examples. but before that, what is the case in drop down box validation overall? You put a blank there +B and then validate as "MUST select...". What is the login behind validating a drop box? Should the validate be done in building the drop box items ?
FK
The selectbox, in add mode is blank. The user must make a selection, that's why I need the validation to work. Same goes for the CreateID field.
The datatype for activity_id field is INT 4 and for CreateID it's NVarChar 25.
Both these dropfields are indexed from another SQL table.
I need this to work so data integrity will be preserved. paul
>>..The selectbox, in add mode is blank. The user must make a selection
Why is it blank then in Add mode or any mode? If you do not allow blank then the drop box should have no blank.
FK
No, in add mode, I want the user to make a selection, that's why it's blank.
If not blank, the user could leave the default which may not be correct. Same thing with the createID field in add mode. It's a way of making the user think about what selection is correct.
Further, Why shouldn't a dropdown box be able to be validated for a blank? If's a data entry field and should.
Paul
OK, I do not understand and I'll return to this issue when I have time.. meanwhile try the following code. The blank dropbox is validated ->
<script language="vb" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim MU As New Tornado.Z()
MU.dbQP = "DSN=nwind| Skin=3| Bookmark=Employees;0| startup=editupdate| TextHolder=EditTitle=Quick Edit with MagicUpdateValidate"
MU.dbCommonTables = "Index=A|Value=Mr.,Mrs.,Ms"
MU.dbEditUpdateFlds = "(;,~)fi=0|ty=RONOUPDATE, fi=1 | oper=EQ| Comp=Kwong, fi=FirstName | oper=ST | Comp=Frank~Polly | Notes=Must be Frank or Polly, fi=3 | oper=NB| Comp=Dummy, fi=titleofcourtesy|ty=Selectbox+b|val=A|Tex=A|oper =NB|Errortext=Cannot be Blank ,fi=HireDate | oper=RAD| Comp=1/1/80-1/1/2000"
MU.ASPdbNET()
End Sub
</script>
I tried what you suggested but, it still allows blanks from the selectbox.
I did a search of this forum and see that someone else was having the same issue. Is it possible the version of Tornado I have is not supportive of this validation?
try this one as see the blank titleofcourtesy field validated ->
http://www.fkw.us/tornado/problem/magicvalidate.aspx
if OK then get the latest (you should have that)
FK
yep, the link worked. the example didn't have the soource code, or is that what you gave me before?
What do I need to do about the version?
yes.. same source as I always deposit the test code now in the same directory of www.fkw.us test server.
I'll send you the non-official DLL again.
FK
Thanks for all your help,Frank, It now works!!!!!:D