Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: How to verify textbox content

$
0
0
Re: How to verify textbox content
FoxInCloud
Re: How to verify textbox content
Dec. 27, 2012
07:21 am
3OE0FRV1AShow this entire thread in new window
Gratar Image based on email address
From:Thierry Nivelet (FoxInCloud)
To:Michele
you can code this as follows:

PROCEDUREValidif thisform.wlHTMLgen ...return .T.elsereturn thisForm.chkValue(This)endifPROCEDURE chkValue(toObject)local luValue, luResult luValue = toObject.Value ... this.chkValueObject = sys(1272, m.toObject) && store object's address into a new form property (to be created) luResult = thisForm.wMessagebox('wFormCallBack', 'Question',4+16+256,'Title') && 'wFormCallBack' should always be the first parameter...return m.luResultPROCEDURE wFormCallBackLPARAMETERS tuUserChoice && User's choicelocal loObject, llResult llResult = m.tuUserChoice = 6 && Yesif not m.llResult and wlWeb() loObject = evaluate(thisForm.chkValueObject) m.loObject.setFocusendifreturn m.llResult


I have this situation:
a form with in a textbox
in the textbox's valid i call a form's method 'chkValue'
ThisForm.chkValue(This.Value)

in this method i make some controls and when there is an error i show a messagebox
if i answer 'no' to this messagebox i have to prevent the user to exit the textbox
the wMessagebox's call is this:

wMessagebox('Question',4+16+256,'Title','wFormCallBack')

in wFormCallBack i test tuUserChoice but i don't want how to use the value returned.


Thierry Nivelet (FoxInCloud)
Never explain, never complain (Queen Elizabeth II)


Viewing all articles
Browse latest Browse all 10393

Trending Articles