URL's in DDX bricks aren't clickable?

Is there a reason why default HTML syntax for links is not working in DDX bricks? Clicking on hyperlink or hyperlinked images doesn't open anything. I see the link appear when I hover over the element but nothing happens when I click ... I need to right-click to open the image or link in a new tab.

Strange that the standard syntax works in an HTML table but I can' get it to work in a brick?

Tagged:

Best Answers

  • meerens
    meerens Member
    Answer ✓

    After whitelisting the domains got this to work.

    function navigateToUrl() {

      let value = document.getElementById('hyperlink').href; 

      domo.navigate(value,true);

    };

    Still no solution for mailto's 😥

  • JosephMeyers
    JosephMeyers Domo Employee
    Answer ✓

    Mailto links were blocked somewhat recently by the browsers and we have plans to allow for setting the frame rules to allow them in the future. Normal links are restricted by the whitelist for security purposes.

  • JosephMeyers
    JosephMeyers Domo Employee
    Answer ✓

    It has to do with the frame the apps use. We are blocking certain things for security reasons and mailto has recently been included into one of the things being blocked.

Answers

  • AnwarBham
    AnwarBham Contributor

    are you using the domo javascript function

    javascript:domo.navigate('');

  • Trying that now but seems to be limited to domains that are whitelisted and doesn't work for mailto.links.

  • meerens
    meerens Member
    Answer ✓

    After whitelisting the domains got this to work.

    function navigateToUrl() {

      let value = document.getElementById('hyperlink').href; 

      domo.navigate(value,true);

    };

    Still no solution for mailto's 😥

  • JosephMeyers
    JosephMeyers Domo Employee
    Answer ✓

    Mailto links were blocked somewhat recently by the browsers and we have plans to allow for setting the frame rules to allow them in the future. Normal links are restricted by the whitelist for security purposes.

  • @JosephMeyers I have built websites that use mailto links and they are still working fine in Chrome and on iOS. Is this an issue with specific browser settings?

  • JosephMeyers
    JosephMeyers Domo Employee
    Answer ✓

    It has to do with the frame the apps use. We are blocking certain things for security reasons and mailto has recently been included into one of the things being blocked.

  • Thanks for clearing that up @JosephMeyers - makes sense now.

    The initial approach for the function was behaving inconsistently and wouldn't always work even with the domain being whitelisted so we came up with a different solution by removing the href from the html element and passing the url in the onclick.

    function navigateToUrl(url) {

    domo.navigate(url, true);

    };

     <img class="icons"

     onclick="navigateToUrl('add url here');"          

     src="link to image file">