Is it possible to place X on my form that will act as closing button?

  • semcodist
    Asked on October 20, 2016 at 5:56 PM

    2. Can I put an X on the top right of the form to close the window?

  • Nik_C
    Replied on October 20, 2016 at 6:16 PM

    You can try inserting the below HTML in your form's code:

    <input type="button" value="Close this window" onDISABLEDclick="self.close()">

    If that doesn't work, please try with this JavaScript code:

     

    Step One: Insert the following lines of code into the head of your HTML page.

    <script language="javascript" type="text/javascript"> 

    function windowClose() { 

    window.open('','_parent',''); 

    window.close();

    </script>

     

    Step Two: Insert the following line of code into the body of your HTML page.

    <input type="button" value="Close this window" onDISABLEDclick="windowClose();">

    You will have to copy that code in code of your website.

    More information you can find on this link.

    If you have additional questions please let us know.

    Thank you!