Miva Merchant Development by Scot's Scripts

JQUERY: Confirm Click with Custom PopUp Message

Miva Knowledge Base
JQUERY: Confirm Click with Custom PopUp Message
Important Notice: This information is for internal reference only. Use at your own risk.
Does Google actually understand your Miva Merchant store? Our JSON-LD schema generator makes sure it does. Contact us to get started. (more info)

JQUERY: Confirm Click with Custom PopUp Message

Scot Ranney • February 20, 2026


This is a slick little jquery bit that gives you a browser popup to confirm your click. Used on modules or in templates.

Includes a way to customize the message.

HTML

First, here's a basic link with a simple default "are you sure?" confirmation message:

<a class="confirmclick" href="something.html">Delete Everything!</a>

This will bring up "Are you sure?"

This link has a custom popup message:

<a class="confirmclick" data-msg="The frogs will be unhappy." href="something.html">Delete all lilly pads</a>

JQUERY

The jquery to handle this is short and simple. It either takes the message you put in data-msg or it defaults to "Are you sure?"

<script>
	$('.confirmclick').on('click', function () {
		var $el = $(this);
		var msg = $el.data('msg');
		if(!msg){
			msg = 'Are you sure?'
		}		
		return confirm(msg);
	});
</script>

https://www.scotsscripts.com/mvblog/jquery-confirm-click-with-custom-popup-message.html

mvkb_jquery