Open dialog box from HTML control

Hi,

I have a requirement where I need to create a .aspx page which shows users product information. I want to put this page in a dialog box so when users click on the hyperlink, it opens in a dialog in the form. Is this possible and how can I add some custom animation so it can slide in from the bottom/top.

Thank you!

Hello @Qman,

You can open .aspx page using the built in Dialog.open() method. Like so:

Dialog.open('Page_URL', {}, {} )

The built in Dialog method doesn't support animation. You can browse for other approaches that supports animation.

Thank you.

How can I integrate this into a HTML control?

Hello @Qman,

How exactly do you want to integrate this in HTML control?

Do you want to display a link that opens the page in the dialog?

If so you can add this code to HTML control:

<a id="mylink" href="#">This is a link that opens dialog</a>  

And run this code on form load to add an onclik function to the link:

fd.spRendered(function() {
    var a = document.getElementById("mylink");
    a.onclick = function() {
        Dialog.open('Page_URL', {}, {} )
        return false;
    }
});
1 Like

Perfect, thank you Margarita!

1 Like