We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

a question regarding the embe

Home Forums Programming a question regarding the embe

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #80543
    deanchen7
    Customer

    Hi,
    I have a question regarding the embed:
    https://nojddesign.com/ElectricGrinder/demo.html
    As you can see from the link, there is a “close button” for the instruction, and the page is supposed to display only one 3D model.

    However, https://www.nojddesign.com/sample-page-for-3d-con/ as this link shows, after I embedded the page on a website, the “close button” disappeared, and it displayed the model I had hidden with a puzzle.

    I wondered if this happened because I used an iframe code to embed, and the CSS and JavaScript didn’t work with the iframe method. Could you please check the links I provided and let me know if there’s any way I can achieve the same result when embedding my page on a website? Thank you for your assistance.

    #80548

    Hi,

    there is a cross-origin error printed in the console while visiting the second link. Basically both the 3d app and the parent page must be served from the same domain. Only in this case the JavaScript will have the access to the UI of the parent page.

    Chief 3D Verger | LinkedIn | Twitter

    #80549
    deanchen7
    Customer

    Hi Yuri,
    Thank you for your response.
    I believe both the 3D app and the parent page are served from the same domain, “nojddesign.com,” but it seems the JavaScript isn’t functioning as expected.

    Could you please provide me with the correct code to embed the app? Thank you.

    #80550

    It looks like sample-page-for-3d-con is loaded from “www.nojddesign.com”, but the iframed page is loaded from nojddesign.com without www. Should be an easy fix.

    Chief 3D Verger | LinkedIn | Twitter

    #80552
    deanchen7
    Customer

    Hi Yuri,
    Thank you for the tips. I have updated both links to be “www,” and I can see that Javascript is kind of working now.

    However, as you can see from the link, https://www.nojddesign.com/sample-page-for-3d-con/, the “close button” is still not functional and doesn’t look right. Could you guide me on how to resolve this issue? Thank you.

    Attachments:
    You must be logged in to view attached files.
    #80558

    It is something with CSS styles. In the standalone page the close button is recognized as grid, but in the iframed page it is not. You might try removing some or all CSS from the parent page to see if it affects your UI.

    Chief 3D Verger | LinkedIn | Twitter

    #80627
    deanchen7
    Customer

    Hi Yuri,
    Thank you for responding and pointing out the issue. I have solved all the problems, and the embedded page works well now. Thanks again for all of your assistance :)

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.