From: | Thierry Nivelet (FoxInCloud) |
To: | Garth Groft |
yes, of course but it is not clear which click() you were referring to. i tried using page 2 click and this is not workable because options form then launches off both page 2 and page 3 clicks. his is why i replied to your post for clarification.
did you tried the code supplied?
we may not be on the same page.
the code which launches the options form is in page3 click event. i.e. when the user clicks on page 3 tab "Options", we launch the Options form.
*!* Page 3 Click event code:LPARAMETERS nButton, nShift, nXcoord, nYcoordIFType('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen && Added by FoxInCloud Adaptation Assistant version 1.20 (source mode) on 05/30/2012 03:27:02 PM&& {en} What follows is executed during HTML generation&& RETURN <value>; value defines how event is handled:&& - IGNORE EVENT: Empty(value) OR isNull(value) ; exemple : RETURN .F. or RETURN .NULL.&& - PROCESS EVENT ON SERVER: NOT Vartype(value) $ 'CX' AND NOT Empty(value) ; example : RETURN .T. (default)&& In this case, event shall execute code in the ELSE block&& - PROCESS EVENT ON CLIENT BROWSER: Vartype(value) == 'C' AND NOT Empty(value) (javascript)&& example :RETURN Textmerge([$('').toggle();]) && show / hide element RETURN .T.&& Process event on server (ELSE block code)ELSE&& Added by FoxInCloud Adaptation Assistant version 1.20 (source mode) on 05/30/2012 03:27:02 PMexternalform Options Options = m.thisform.wForm('Options.scx',"wFormCallBack", thisform.mode,TRIM(users.uid))*-FIC- Replaced by FoxInCloud Adaptation Assistant version 1.20 (source mode) on 05/30/2012 03:27:02 PM *-FIC- DO FORM Options WITH thisform.modeENDIF&& AddWformcallback contains:
LPARAMETERS tuUserChoice && @ {fr} Choix de l'utilisateur {en} User's choice
thisform.command1.enabled = .T.
thisform.PageFrame1.Page2.Text4.Refresh
thisform.PageFrame1.Page2.Text15.Refresh
thisform.PageFrame1.activePage = 2
___________________________________________________________________________________you need to explicitely set activePage in .Click() because server does not know page has changed
LPARAMETERS nButton, nShift, nXcoord, nYcoordIFType('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen && Added by FoxInCloud Adaptation Assistant version 1.20 (source mode) on 05/30/2012 03:27:02 PM&& {en} What follows is executed during HTML generation&& RETURN <value>; value defines how event is handled:&& - IGNORE EVENT: Empty(value) OR isNull(value) ; exemple : RETURN .F. or RETURN .NULL.&& - PROCESS EVENT ON SERVER: NOT Vartype(value) $ 'CX' AND NOT Empty(value) ; example : RETURN .T. (default)&& In this case, event shall execute code in the ELSE block&& - PROCESS EVENT ON CLIENT BROWSER: Vartype(value) == 'C' AND NOT Empty(value) (javascript)&& example :RETURN Textmerge([$('').toggle();]) && show / hide element RETURN .T.&& Process event on server (ELSE block code)ELSE&& Added by FoxInCloud Adaptation Assistant version 1.20 (source mode) on 05/30/2012 03:27:02 PMthis.Parent.ActivePage = 3 && server does not know this page is activeexternalform Options Options = m.thisform.wForm('Options.scx',"wFormCallBack", thisform.mode,TRIM(users.uid))*-FIC- Replaced by FoxInCloud Adaptation Assistant version 1.20 (source mode) on 05/30/2012 03:27:02 PM *-FIC- DO FORM Options WITH thisform.modeENDIF&& Added by FoxInCloud Adaptation Assistant version 1.20 (source mode) on 05/30/2012 03:27:02 PM
responding to your reply here i just added activepage to addunit's pageframe1.page2.wcPropSave, but still only works in LAN mode, not Web mode.pageframe1.page2.wFormCallBack code (retruninhg from options form):
thisform.command1.enabled = .T.
thisform.PageFrame1.Page2.Text4.Refresh
thisform.PageFrame1.Page2.Text15.Refresh
thisform.PageFrame1.activePage = 2
* ?Lower('ActivePage') $ lower(thisform.PageFrame1.page2.wcPropSave) - does = .T.
*!* thisform.PageFrame1.page2.setfocus && this command is not needed
? Lower('ActivePage') $ lower(yourPgf.wcPropSave)
this command looks like a winner and does work great in FiC LAN mode, but no luck in Web mode.
did you try this?
thisform.PageFrame1.activePage = 2
in this app, thisform.PageFrame1.Page2.SetFocus is working in FiC LASN mode but not in Web mode. we tried thisform.PageFrame1.Page2.Activate but same result.we also tried adding setfocus and activate to wcPropSave propety for page 3. this apprach gives FAS errors (not allowed).
so at this time we are still searching for a solution.
garth
setFocus() is supported
clicking the options tab (page 3) on oiur addunit form executes the options tab click event code below. retuning from the options form, we need to set focus back to the design tab (page 2) (thisform.PageFrame1.Page2.SetFocus).my recollection from trainng under you is that setfocus has no effect in FiC Web mode. however, we must somehiw be able to do this. is theree a workaround to setfocus? KEYBOARD command? set focus to a container on the design tab? other? there must be a way to set focus in a browser. i have used apps which direct the user to a particular location on a form after attempting to proceed with missing data entries. btw, the mesage board works this way if you forget to enter the subject for example.
external form Options
Options = m.thisform.wForm('Options.scx',"wFormCallBack", thisform.mode,TRIM(users.uid))
thisform.PageFrame1.Page2.SetFocusgarth
Thierry Nivelet (FoxInCloud)
Never explain, never complain (Queen Elizabeth II)