DDX Bricks - Creating a linkable <iframe>

pimogo
pimogo Member

Hi - Looking for some assistance on editing a ddx brick html table card i downloaded from the appstore. I turned to ddx bricks because i could not get iframes to show up using ordinary html table cards. Now that i have an ddx html table correctly showing my embed iframes in one of the columns, i'd like to add additional functionality to it by making it linkable to a domo page.

if this is not possible, then i can settle for adding an additional column containing a hyperlink. How do i do this with ddx bricks? if i was using an ordinary card, i would simply do the following:

CONCAT('<div><a href="https://onjira.domo.com/browse.com"','"target="_blank">',`Sales Rep`,'</a></div>')

any help greatly appreciated.


thanks!

Comments

  • Are you wanting to have the iframe clickable and take you to a new domo page or are you wanting a link/text inside your iframe to go to the new page?

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • pimogo
    pimogo Member

    i'd love to know how to do both, truly, because there is a use case for both.

    but my primary use case right now is to make the iframe linkable to a domo page. if that is not possible, then the workaround would be to create a text with embedded hyperlink such as "Link here".

    in reviewing the javascript, it appears the contents of the table get ingested into an multidimensional array. i haven't yet cracked the correct code to extract the column of data containing the iframe to then manipulate. truthfully its a bit over my head and online resources aren't specific to the domo environment so any code i have played hasn't yielded anything positive.

    but not read to give up yet :)


    any help would be tremendously helpful!


    H

  • I get an error when trying to open a new link.

    Blocked opening '<URL>' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.

    I think parent ifram has sandbox property and don't have 'allow-popups' in sandbox.

    You may have to ask the Domo developers to allow-popups in the sandbox.

  • Does this help with what you are looking to do? https://developer.domo.com/docs/dev-studio-guides/domo-js#domo.navigate

    There may also be a feature switch you need to have turned on for your customer to setup your whitelist and the Support team can help you with that.

  • DomoDork
    DomoDork Contributor

    Hi @pimogo

    I realize this is an old post at this point and you've probably already solved it, but here is how I did it in a DOMO brick.

    <a href="#" onclick="javascript:domo.navigate('/page/-100000/kpis/details/1259181756', true);">

    The true parameter will open the link in a new tab/window, false will open the link in the same window. Note that you will not see this work in action while in the Domo Brick card editor. You'll want to save the changes and go to your dashboard that has your Domo Brick to see the actual behavior of clicking the link.