Last post Mar 01, 2021 08:11 AM by samaremad
Member
8 Points
26 Posts
Feb 28, 2021 01:14 PM|samaremad|LINK
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; }
All-Star
53711 Points
24037 Posts
Feb 28, 2021 01:26 PM|mgebhard|LINK
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>
Mar 01, 2021 08:11 AM|samaremad|LINK
thank you it is worked correct
Member
8 Points
26 Posts
how to stay in the current page if i press on cancel after confirmation
Feb 28, 2021 01:14 PM|samaremad|LINK
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;
}
All-Star
53711 Points
24037 Posts
Re: how to stay in the current page if i press on cancel after confirmation
Feb 28, 2021 01:26 PM|mgebhard|LINK
The code sample is incomplete. We can only guess...
Below is a working example.
Member
8 Points
26 Posts
Re: how to stay in the current page if i press on cancel after confirmation
Mar 01, 2021 08:11 AM|samaremad|LINK
thank you it is worked correct