NetTalk Central
Toggle navigation
Login
Register
×
Welcome,Guest
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
loc:alert not working in button validate
« previous
next »
Print
Pages: [
1
]
Author
Topic: loc:alert not working in button validate (Read 3008 times)
cwtart
Full Member
Posts: 130
loc:alert not working in button validate
«
on:
June 19, 2013, 12:11:50 PM »
C8 9661 NT7.11
I have a memory form that has a button tied to a progress control. I used example web72 to set this up and it works fine. But - I cannot get loc:alert to display anything in the send-to-server validate embed for the button. I can put a Message('stop here') in the embed and it shows so I know the code is being called but setting loc:alert = 'stop here' does not do anything.
I need to do some validation when the button is clicked and stop the process from taking place if validation fails but I cannot prevent the process from running - presumably because alert does not work in the validate embed.
I have verified this problem by modifying example web72 and it has the same result as my app - no validation for the button that calls the process and is tied to the progress control.
Chuck
Logged
kevin plummer
Hero Member
Posts: 1195
Re: loc:alert not working in button validate
«
Reply #1 on:
June 19, 2013, 03:37:42 PM »
Hi Chuck,
If you are running your report via a url on your button then any ss code won't execute before the report runs. Otherwise you could try p_web.popup('prob with report') to provide info to the user of why the report did not work but it won't stop your process - you need to use a bit of logic in your code if to proceed or not.
Cheers.
Kev
Logged
johanco123
Full Member
Posts: 245
Re: loc:alert not working in button validate
«
Reply #2 on:
June 19, 2013, 11:20:18 PM »
Hi Chuck,
Try this code after your loc:alert
e.g loc:alert = ('Override the rate to make the Loss of Rent < 25%!')
p_web.SetAlert(loc:alert, net:Alert + Net:Message)
It works for me and it is the same as a message
Regards
Johan
Logged
Bruce
Global Moderator
Hero Member
Posts: 11244
Re: loc:alert not working in button validate
«
Reply #3 on:
June 19, 2013, 11:46:56 PM »
>> I have verified this problem by modifying example web72
cool, please port the modified example & dict, and some simple directions on what to do - where it does the unexpected and so on, and I'll take a look.
cheers
Bruce
Logged
cwtart
Full Member
Posts: 130
Re: loc:alert not working in button validate
«
Reply #4 on:
June 21, 2013, 05:28:57 AM »
Kevin,
p_web.popup('prob with report') worked fine for me. Thanks,
Chuck
Logged
Print
Pages: [
1
]
« previous
next »
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
loc:alert not working in button validate