NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: osquiabro on October 05, 2019, 06:28:35 AM
-
is possible create a case message popup like clarion desktop ?? like this :
CASE MESSAGE('Are you sure you want to Change Zip Code? etc..
thanks
-
Hi Osa,
yes, but the context matters. Remember the web page is always moving forward.
So it's probably not going to "work" the way you expect - there's no procedure "waiting" on the server for the user to enter input.
So in order to answer this question better I would need to know a lot more about your context. Where you are, what you are doing, and what you are hoping to do with this message, etc.
cheers
Bruce
-
is simple i have a Zip Code field and need a popup message before change the value of the field
-
You can have a popup message - alerting the user to some detail, when the field is changed.
But in that context it would be a message, not a decision (ie not a yes/no question).
Tell me more about the message you are intending to display, and what you then expect the user to do, and then what you want to do based on that...
cheers
Bruce
-
Hello Bruce,
I think osquiabro is looking for confirmation message, similar when in a browse the user is gonna delete a record. But in this case, alter or change the record.
-
Exactly urayoan, but for more specific this is a code that run in desktop program and needed a similar code with NT
CASE MESSAGE('Are you sure you want to Change Zip Code?, This Change Delivery Charge.','Alert',ICON:Question,+Button:Yes+Button:No,,1)
OF Button:Yes
PUT(BillofLadings)
History::Bil3:Record :=: Bil3:RECORD
SQL{prop:sql} ='select BillofladingId, isnull(ChargeId,0) as ChargeId, PaymentType,0 as ChargeTypeId, ChargeDescription from billofladingcharges where billofladingid= '&Bil3:BillofLadingId & ' AND ChargeDescription = <39>'& 'DELIVERY<39>'
LOOP
NEXT(SQL)
IF ERRORCODE() THEN BREAK.
CASE Bil3:PaymentZone
OF 'C'
Shipper{prop:sql} = 'CALL BolChargesByCharge('&Bil3:BillofLadingId &','&chr(39)&CLIP(SQL:C3)&CHR(39)&','&Bil3:CustomerId&','& 0 &','&CLIP(SQL:C2) & ',0)'
BREAK
OF 'P'
Shipper{prop:sql} = 'CALL BolChargesByCharge('&Bil3:BillofLadingId &','&chr(39)&CLIP(SQL:C3)&CHR(39)&','&Bil3:ShipperId&','& 0& ','&CLIP(SQL:C2) & ',0)'
BREAK
OF 'T'
Shipper{prop:sql} = 'CALL BolChargesByCharge('&Bil3:BillofLadingId &','&chr(39)&CLIP(SQL:C3)&CHR(39)&','&Bil3:PartyId&','& 0 &','&CLIP(SQL:C2) & ',0)'
BREAK
END
END
Charges.Load
Charges.Reset(1)
OF Button:No
Bil3:ShipToZipCode = History::Bil3:Record.Bil3:ShipToZipCode
Bil3:ShipToCity = History::Bil3:Record.Bil3:ShipToCity
Bil3:ShipToState = History::Bil3:Record.Bil3:ShipToState
SELECT(?Bil3:ShipToZipCode)
ThisWindow.Reset(1)
END
END
-
this is possible with NT or not?
-
Hi Osquiabro,
Totally possible.
Create Memory Form and format it so it can ask your question (this could easily be generic like message).
Call it as a popup at the correct time.
Record its response somewhere (like session variable).
Back when your previous screen gains focus after the popup closes, check the session variable.
Perform necessary actions.
Regards
Bill
-
but how call a popup after user change a value of field like my sample code that is when change zip code
thanks..
-
Tick "Send new value to server", then in that embed, check if the value changed.
There is a javascript function called ntd.push that will open a popup window for you. I also think in a newer version of NT (then what I user), there may be a nicer way to access it.
Use p_web.script & ntd.push to open your popup (dont forget you need to tell NT you are using a popup window by calling YourMessage(p_web,Net:Web:Popup) in your calling screens init stuff.
eg.
IF ValueChanged = True
p_web.Script('ntd.push(''YourMessage'',other parameters I cannot recall go here);')
.
-
bshields, thanks for your guide, look how it looks
-
Perfect :)
-
Hi Osquiabro,
Wow that looks nice.
I need to do something similar but have not idea how and where to start.
Are you willing to give a step by step guide on how you have done this please.
Regards
Johan de Klerk
-
hi Johan, this is small sample of call messagebox, the password field call a messagebox
-
i have a trouble with this solutions, if try to restore the previous value if a user select NO the field the code in embed no work more.
the code in is:
case p_web.gsv('Loc:Response')
OF 1
loc:alert='Return Value for MessageBox: '&p_web.gsv('Loc:Response') &' Yes'
OF 2
loc:alert='Return Value for MessageBox: '&p_web.gsv('Loc:Response') &' No'
p_web.SetSessionValue(' MAI:Password', p_web.gsv('Password') )
do refresh::MAI:Password
END
Do SendMessage
the do refresh::MAI:Password kill the embed work again
the p_web.gsv('Password') is initialize in PreUpdate
-
Hi Osquiabro,
Thanks for the example.
However I can't open it, I am on C10.
Can you maybe export the DCT and App please.
Regards
Johan de klerk
-
V10..