locked
how to stay in the current page if i press on cancel after confirmation RRS feed

  • Question

  • User-1566284277 posted

    hi everyone i make a confirm on a form is suppose if i press ok load the next page and if i press on cansel stay on the current page 

    and here is my code 

     function confirmation() {


         var r=confirm("@SiteResource.confirm");
         

            if (!r)
                return false;
        }

    Sunday, February 28, 2021 1:14 PM

Answers

  • User475983607 posted

    The code sample is incomplete.  We can only guess...

    Below is a working example.

    <a href="/home/index" onclick="return confirm('Are you sure!');">Home</a>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, February 28, 2021 1:26 PM

All replies

  • User475983607 posted

    The code sample is incomplete.  We can only guess...

    Below is a working example.

    <a href="/home/index" onclick="return confirm('Are you sure!');">Home</a>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, February 28, 2021 1:26 PM
  • User-1566284277 posted

    thank you it is worked correct 

    Monday, March 1, 2021 8:11 AM