I’m doing an appplication that works in Notes Client and Web Browser, so, I have an agent coded in Lotus Scrip, It modifies some fields in others documents but, before this, I would have to validate if the user(on web browser) is sure to do this, so, I tried to embedded JAVASCRIPT into Lotus Scrip code with the PRINT statment, but i don’t know How I can get the value of my validation, it means, if a user press a click on Action Button, It appears a message showing “Are you sure?” and how I can know if the user press YES or NO for continuing my code…
You can’t. Code either runs in the client or on the server – the server can’t partially run an agent then wait for user input. You would need to get that information BEFORE submitting the request to run the agent, like on the form or $$ViewTemplate or whatever, then either add the value to the agent’s URL (for a GET) or put the value into a submitted field.
Place a hidden field on the form.2. Have the javascript change the value of that field if the user clicked yes.
When the form is submitted to the LotusScript agent check the value of the that field. I use this method for JS validation where I have to use formula language in the action button.
In my notes form if my valid field value is true I use the RunToolsMacro command otherwise I use the ViewRefreshFields command (do nothing).
If you place “hidden” in the HTML design tab for the field the field will show hidden on the web. Otherwise you will have to place the field in a hidden form location and use pass thru html to manually code a hidden input element.