NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: terryd on January 25, 2012, 04:59:54 AM
-
Windows7Ultimate 64bit Clarion 63_9056 NT545
I have a field APP:ProductID
I have checked lookup button and set the lookup info 'from table' etc.
On the clientside server code
I have the following code
DO CalculatePremium
p_web.SSV('NewProductCode',p_web.GSV('APP:ProductID'))
p_web._trace('application_form newproductcodevalue ' & p_web.gsv('NewProductCode'))
The trace does not fire these are the dbgview lines selecting the product lookup
[\\DAVCOMM-A9E687B]
00000005 55.67189789 [3552] [netTrace][thread=4] SendError = 404 The page cannot be found : The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. FileRequest=[davcomm.css]
00000006 58.29903030 [3552] [netTrace][thread=4] SendError = 404 The page cannot be found : The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. FileRequest=[davcomm.css]
00000007 61.06856918 [3552] [netTrace][thread=4] SendError = 404 The page cannot be found : The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. FileRequest=[davcomm.css]
00000008 64.32103729 [3552] [netTrace][thread=4] SendError = 404 The page cannot be found : The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. FileRequest=[davcomm.css]
00000009 66.82864380 [3552] [netTrace][thread=4] SendError = 404 The page cannot be found : The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. FileRequest=[davcomm.css]
00000010 68.98772430 [3552] [netTrace][thread=4] SendError = 404 The page cannot be found : The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. FileRequest=[davcomm.css]
00000011 71.85068512 [3780] GROUP/OPTION: draw text
The DO calculate premium routinee (obviously) calculates a premium which field I reset in the clientside reset field
No premium is calculated although wherever else in the procedure I call the do calculate routine the premium is calculated, the newproductcode is also not set.
It appears that the client side code is not firing in this situation.
-
sorry - Terry, I'm really not understanding the question. Can you post an example?
cheers
Bruce
-
Hi terry,
if your lookup is a popup then you might need to move your code to the embed GotFocusBack and call the reset of the field by handcode.
-
Thanks Kevin
No lookup is standard, no popup.
I'm going to see if I can create a small uploadable demo this evening.
-
NT545
Attached is app web2a which uses the standard dct and tables from example2.
I have added a p_web._trace line in the alias_FORM ali:mailboxnumber in clientside server code
start dbgview
select the test menu
insert an alias record including selecting a mailbox number
There is no debugview line.
[attachment deleted by admin]
-
hi Terry,
ok, I'm with you now.
so - the Validate::fieldname routine is called asynchronously when the entry field on the form changes. this might happen if the user types in a valid value (in the example try Dave or Eliza). It's a good place to call some code you want to do to the screen when the field changes _but the page does not_.
that's the key. It's a good place when the page doesn't change. You _should_ have your code there to cater for the directly entry of a valid value, or indeed if you change to a popup lookup. (the appearance and disappearance of popups does not mean the _page_ changes)
but in the example, if you click on the lookup button then the page does change. And when you click select on the lookup the page changes again. So the Validate::fieldname routine is no good.
There is however another routine - one called "after lookup". In this routine you can embed additional actions to take "when a lookup has been completed".
Because we don't like duplicating embed code unnecessarily, the Validate::fieldname routine _also_ calls "After Lookup" regardless of how the field actually changed. So, in short, you can move your code from Validate::fieldname into AfterLookup - you don't need it in both places.
cheers
Bruce
-
Thanks Bruce
That sorted it.