<div id="UniqueDialogID0001">
<div id="text"></div>
<a class="btn" onclick="Dialog(this)">Dialog</a>
<a class="btn" onclick="Dialog2(this)">Dialog2</a>
</div>
<script>
$("#text").html(new Date().toLocaleTimeString());
function Dialog2() {
console.log('Dialog2()');
$("#text").html(new Date().toLocaleTimeString());
}
</script>