How do we create Domo Back Button?

96 Views Asked by At

I have creating a domo assets for back button in domo but the problem is the back button won't work the back button cannot by pass the iframe which the back button is inside the card frame.

Any code that I can use for this? Your help much will appreciated. Thanks!

<html>
  <head>
    <link rel="stylesheet" href="app.css" />
    <base target="_parent">
  </head>
    <!-- <a id="back-button" target="_parent" href="#"><span>&#8592;</span> Back</a> -->

    <a id="back-button" href="#"','"target="_parent"><span>&#8592;</span> Back</a>

    <script src="app.js"></script>
    <script src="domo.js"></script>
  </body>
</html>

INSIDE APP.JS

document.getElementById("back-button").top.history.back()

1

There are 1 best solutions below

0
jasonleehodges On

The domoapp iframe is in a sandbox and does not give you access to manipulate the parent. That said, what are you trying to do? If you can keep track of what page "back" should be navigating to, you can use domo.navigate() and navigate to a particular page.