Answers for "js open popup"

10

javascript open new window

<a onclick="window.open(document.URL, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');">
Open New Window
</a>
Posted by: Guest on February-13-2020
0

javascript popup in small window

<a href="/index2.php?option=com_jumi&fileid=3&Itemid=11"
   onclick="window.open(this.href,'targetWindow',
                                   `toolbar=no,
                                    location=no,
                                    status=no,
                                    menubar=no,
                                    scrollbars=yes,
                                    resizable=yes,
                                    width=SomeSize,
                                    height=SomeSize`);
 return false;">Popup link</a>
Posted by: Guest on September-17-2020
1

popup JavaScript code

document.getElementById("open-popup-btn").addEventListener("click",function(){
  document.getElementsByClassName("popup")[0].classList.add("active");
});
 
document.getElementById("dismiss-popup-btn").addEventListener("click",function(){
  document.getElementsByClassName("popup")[0].classList.remove("active");
});
Posted by: Guest on May-07-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language