Home Forums Basel support forum Create a popup – HTML Open Link in New Fixed Size Window

Create a popup – HTML Open Link in New Fixed Size Window

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7575

    Estefania
    Participant

    Hi!!!!
    My client has tell me that he needs a popup opening form a link in attribute description, in order to show a table with different sizes and measures of the product.

    I have been trying with this code, but with “partial” success:

    <a href=”http://………&#8221;
    target=”popup”
    onclick=”window.open(‘http://……&#8230;.’,’popup’,’width=600,height=600,scrollbars=no,resizable=no’); return false;”>
    View Size Guide

    The page is open in a new window, but not in the same window in small size…

    I hope I explain well and you can help me ….

    Thanks a lot in advance!!

    Regards, Estefanía.

    #7581

    Artem Temos
    Keymaster

    Hello,

    Thank you for the question.

    Try to use the following code snippet to make link open a popup window http://www.w3schools.com/code/tryit.asp?filename=FAGII8AT4KEB

    Regards

    #7607

    Estefania
    Participant

    Hi!!!!
    Sorry :(, but that code is not working.
    Maybe I am not placing in right place.

    I am writing in description of an attribute, and I get in product single page this: See Image.

    And when I click on button, no window is open, the page is reload an product is added to cart…. 🙁

    Thank you in advance!!!!!

    Attachments:
    You must be logged in to view attached files.
    #7612

    Artem Temos
    Keymaster

    Hi,

    Try to move this JS code to the Custom JS in Theme Settings

    function myFunction() {
      var newWin = window.open('/', 'example', 'width=600,height=400');
    }

    And your button replace with this one <a onclick="myFunction()">Try it</a>

    Regards

Viewing 4 posts - 1 through 4 (of 4 total)