How Can We Display Html Content Through Window. showModalDialog()?

I have a website that use showModelessDialog () to open pop up window. The modal dialog is open but appears in blank and not render the content. However, I have some text in the ‘modeless.html’. Below is my code. Can someone suggest ?

<script type="text/javascript">
           function OpenModeless() {
               if (window.showModelessDialog) {        // Internet Explorer
                   showModelessDialog("modeless.html", window, "dialogWidth:800px; dialogHeight:600px; ");
               }
               else {
                   window.open("modeless.html", "", "width=800, height=600, alwaysRaised=yes");
               }
           }
    </script>
<img alt="Buddha" class="gallary" src="Images/Gallary/BuddhaThumbs.jpg" onclick="OpenModeless();" />
1

1 Answer

How to display HTML Content using window.showModalDialog()

Try that, the question seems to of been asked previously. I simply googled "showModalDialog display html content". Hope this helps.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest