Jump to content

HELP: Create a module with 1 button to open a new popup window


Recommended Posts

Hi all,

 

After struggling with creation of a new module to create a button

for a simple popup a NEW mini window that display another .html page with some javascripts.

 

For HTML, I can use target="_blank" <= but this opens a new TAB to the browser...

popup window within your HTML document

 

For javascript, I can use window.open() like below:

function basicPopup(url) { // Popup window function
popupWindow = window.open(url,'popUpWindow','height=500,width=500,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');
    }

I been playing with http://doc.prestasho...ingafirstmodule

 

I am using Prestoshop 1.6.

 

My testhtml source code: (now still a blank that display "test")

<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Plugin Sample</title>
    <script type='text/JavaScript' src='/plugin/JS/plugin.js'></script>
    <style type="text/css">

        </style>

</head>
<body class="tundra">
test
</body>
 <script language="JavaScript" type="text/JavaScript">

   </script>
</html>
 

Can someone kindly guide me what is the key api to do that?

I just want to display another mini window with the html page with javascript.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...