Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #626178

    jorgeHX
    Participant

    Hi,
    I have a button in my xtheme which shall open up a popup. I thought about adding an onclick action like shown below but this does not work. How do I have to add the onclick action for x-buttons?

    My button is this:
    [button type="flat" shape="square" size="regular" href="#" target="_blank" title="Open Popup"]

    And I need to add an onclick action like this:
    <a href="#" onclick="window.open('/widgets/popup.html','popup','width=550px,height=750px,scrollbars=0,menubar=0,toolbar=0' )">My popup.</a>

    My idea was like this but it did not work. Any quick suggestions?

    [button type="flat" shape="square" size="regular" href="#" target="_blank" 
        onclick="window.open('/widgets/popup.html','popup','width=550px,height=750px,scrollbars=0,menubar=0,toolbar=0' ) 
        title="My popup"]

    Thanks

    #626199

    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in!

    Adding onclick on the button shortcode will not work. We recommend an alternative in getting the popup link in your page. Please use a raw content element and insert this code:

    
    <a class="x-btn x-btn-flat x-btn-square x-btn-regular" href="#" target="_blank" onclick="window.open('/widgets/popup.html','popup','width=550px,height=750px,scrollbars=0,menubar=0,toolbar=0' )" title="My popup">My popup.</a>

    We would loved to know if this has work for you. Thank you.

    #626231

    jorgeHX
    Participant

    Yes, this worked perfectly. thank you.

    #626306

    John Ezra
    Member

    You’re most welcome!