Popup from DotNetNuke HTML module

Return to previous page

  • 4/7/2015
  • 3221 Views

Comments

3221 Views

Popup from DotNetNuke HTML module

Last updated 4 years ago

Comments

Common

(Enter the content of this article below)

Advanced

 
In this wiki lets know the different ways to open popup from DNN HTML module.

Suppose in some time requirements comes as to open content in a popup on click of a link present in HTML Module.
DNN has added dnnModal.show to version 6 onwards, by using which we can do this.

For Version 6 onwards:

In HTML module i have content as:

<a href="#" id="ancPopUp">Sunil</a>

Now HTML modules Settings>Advance Settings, place the below script to the header section

< script type="text/javascript">
$(document).ready(function () {
$("#ancPopUp").click(function () {
dnnModal.show(MyUrl + '?popUp=true', false, 550, 950, false);
return false;
});
});
</ script>

This will open up the popup on link click.

For version prior to 6:

We can do this using the jquery fancybox.

In HTML module i have content as:

<a href="MY URL" id="ancPopUp">Sunil</a>
Now HTML modules Settings>Advance Settings, place the below script to the header section

< script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#ancPopUp").fancybox({
'autoDimensions': false,
'autoScale': false,
'width': 614,
'height': 546,
'enableEscapeButton': false,
'hideOnOverlayClick': false,
'scrolling': 'no',
'type': 'iframe'
});
});
</ script>

This will also do the same work.

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out