Embedded DOMO dashboard not loading on click

Hi experts,

I do have a system in which I am showing my 4 domo dashboards on one page via tabs. Each dashboard is embedded and does visible when we click on them and then I change the src attribute of iframe to load that embedded link. Now what's happening is that, when I first load the page using hard refresh, the first dashboard loads quickly but when I try to load the other dashboard by clicking on them, the data loads but iframe not loading, this could be because I am getting error on other dashboards an error in browser console. which is like 400 bad request, and that same embedded link does open on any browser , that's a public url from domo.

My dashboard where I am loading via tabs on click is below :

Best Answer

  • Jones01
    Jones01 Contributor
    edited January 24 Answer ✓

    @muhammadtalha ok. Obviously you know anyone would be able to view those boards if you haven't restricted the domains in your instance?

    Looking at the request I would have thought it would be doing an GET not a PUT.

    You could try removing the iframe completely and recreate it in javascript when you click a new tab then place it in the DOM.

Answers

  • Jones01
    Jones01 Contributor
    edited January 24

    @muhammadtalha is this a private embed I assume?

    The fact you said it loads quickly now makes me think these are public embeds.

  • @Jones01 No its a public embedding of all my 4 dashboards connected in tabs, which I am changing iframe src on click . Also this issue is coming in google chrome for now, I checked in other browser, its working. Strange!!

  • Jones01
    Jones01 Contributor
    edited January 24 Answer ✓

    @muhammadtalha ok. Obviously you know anyone would be able to view those boards if you haven't restricted the domains in your instance?

    Looking at the request I would have thought it would be doing an GET not a PUT.

    You could try removing the iframe completely and recreate it in javascript when you click a new tab then place it in the DOM.

  • MattTheGuru
    MattTheGuru Contributor

    Is this essentially what you have done? This is an example react site I made a while back:
    https://example.clearsquare.co/xkPJn ← These are all publicly embedded.

    If it is email me and I can share you the code to doing this.

    I would very much recommend writing the code to privately embed the content. Even restricting the content via URL means I could go to your landing page/login screen and render the public content.

    Here is a software that I built to do a similar task to what I think you need yours to preform:

    https://youtu.be/tMto9t8o2no?si=iCKymRs7kTUVJL5P

    ** Was this post helpful? Click 💡/💖/👍/😊 below. **
    ** If it solved your problem. Accept it as a solution! ✔️ **

    Or do you need more help? https://calendly.com/matthew-kastner/15-minute-chat
    Did I help you out? Feedback is priceless and will help me more than you know.Write a review!

  • @MattTheGuru Thanks for sharing, really appreciated.

    Your dashboards are showing as a page reload, in my case, I have to reload them via JQuery on a tab click, and we do also have present filters too like a global filters, which still there even you switch between dashbaords.

  • MattTheGuru
    MattTheGuru Contributor

    Yeah, the one example is reloaded here is another example video.

    https://drive.google.com/file/d/1oafrqibTrbRG0_qIRAWCn9vXOOxlgoP1/view?usp=sharing

    But my guess is going to follow @Jones01 that you may just be updating the src of the iframe and the DOM doesn't fully register this change. By just inserting an entirely new iframe you will likely inform the browser of a complete refresh.
    _________

    And on the secondary note, on private embed, to switch to private you will need to "server render" the iframe. Here is an image function that I use to do just this (from a node server). I can send you the code and you can run it through chatgpt to convert it to your server's code.

    This would mean on tab click you would call a server endpoint that would return the pre-built iframe to render.

    ** Was this post helpful? Click 💡/💖/👍/😊 below. **
    ** If it solved your problem. Accept it as a solution! ✔️ **

    Or do you need more help? https://calendly.com/matthew-kastner/15-minute-chat
    Did I help you out? Feedback is priceless and will help me more than you know.Write a review!