<a href="#" onclick="showInfoBar('message')">Info Bar</a> <a href="#" onclick="showPopup('Do you want to delete all appointments?','Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam pulvinar, enim ac hendrerit mattis, lorem mauris vestibulum tellus, nec porttitor diam nunc tempor dui. Aenean orci.')">
back to start</a>
</div>
</div>
</div>
<div id="PopupDiv" class="Popup">
</div>
<script type="text/javascript">
Cufon.replace('.top_nav a');
Cufon.replace('.media_help h1');
</script>
<script type="text/javascript">
function showPopup(ttle, messg) {
$.get('@Url.Content("~/Home/InfoBox")', { title: ttle, msg: messg }, setData);
}
function showInfoBar(messg) {
$.get('@Url.Content("~/Home/InfoBar")', { msg: messg }, setData);
}
function setData(result) {
$("#PopupDiv").html(result);
// viewing the div as block
$("#PopupDiv").css("display", "block");
}
</script>