NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: jking on February 18, 2018, 11:31:08 AM
-
I have a need to close a browse, shortly after opening, based on a condition. I want to display a message and then when the user closes the message, have the browse close automatically.
I have experimented with the following in the generate browse embed:
p_web.Script('$(''[data-do="cancel"]'').click();')
p_web.Script('alert("Please enter the Pre-Results First!");')
The code to generate the message works, but the browse is not closed. Is this going to work or can someone suggest a better way?
Thanks,
Jeff
-
Hi Jeff,
First, I think your logic is backwards.
>> I have a need to close a browse, shortly after opening, based on a
>> condition.
why go to the browse at all? why mislead the user into thinking something is
possible, then tell them it's not?
>> I want to display a message and then when the user closes the message,
>> have the browse close automatically.
I'm not 100% sure I'm a fan of this approach, but try doing the Alert line
first.
cheers
Bruce