Close Form from jscript

Hi to all,

Is there a way to force the execution of the close form event directly at the load form event (for example after a check and an alert to the user)?

This to avoid of raising an user error not appreciated from the end users.

 

Thanks in advance.

Andrea

Tagged:

Comments

  • I have a solution for V7, but the map we use currently has not been migrated to a V9 project yet.  I have no idea if it would work the same in V9 as in V7 -- but hope this or something similar when we do migrate later this year.

     

    In our V7, we have a client side script which ultimately calls

    parent.CancelClick()
    

     to immediately close out the form after displaying a confirmation message on form load.

  • Unfortunately It seems not working on v9.

    But, thanks for the idea (wich could be useful on my older processes ;-) )

     

    Andrea

  • Try cancelForm() from a client-side script. You can also use buttonClick to click any buton on a form so you could add your own cancel button and click this if that was more convenient.

     

    Hope this helps.

  • Oh...!!! It was so easy....!!! :smileyembarrassed:

    Thank you Paul!

     

    Andrea C.