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.

Colorpicker connection in WordPress

Home Forums Puzzles Colorpicker connection in WordPress

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #78176
    deconstruction
    Customer

    Hello. We have a problem that can’t solve right now. Hope you can help us with this.

    For several days we have been trying to link the color picker RGB value on a WordPress page to the color of my T-Shirt, which we made in Blender. We need the person who visits the page to be able to choose the color of the shirt using the color picker themselves. But we can’t find a way to do this.

    This is my color picker code in WordPress:
    <input type=”color” id=”color”>

    And this is the error, which we see in the console.
    Uncaught SecurityError: Failed to read a named property ‘document’ from ‘Window’: Blocked a frame with origin “https://cdn.soft8soft.com&#8221; from accessing a cross-origin frame.
    at Object.getElements (visual_logic.js:135:24)
    at eventHTMLElem (visual_logic.js:207:23)
    at PL.init (visual_logic.js:218:1)
    at Base T-shirt.js:53:20
    at v3d.js:1:1390039

    We use this structure right now (know that this is not a full structure for color picker action, but first of all needed to understand if we could read the external variable from the site, not from the Verge 3D window).

    To create this algorithm, we used the forum answers which I found in these articles:
    1. Color Picker – Change Diffuse Material

    Color Picker – Change Diffuse Material


    2. Configure ANY color

    Configure ANY colour ?

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

    Hi there,

    From the error message I can see that the Verge3D app is deployed on a different domain (on Verge3D Network) which forbids it from accessing the parent page. The best way to overcome this limitation is to use the call method + postMessage puzzle:

    https://www.soft8soft.com/docs/manual/en/puzzles/HTML.html#dom_object_call

    Chief 3D Verger | LinkedIn | Twitter

    #78187
    deconstruction
    Customer

    Thank you. I will test it and came back.)

    #78196

    Sure. Alternatively you can deploy your Verge3D app on the same domain as your website rather than upload to Verge3D Network.

    Chief 3D Verger | LinkedIn | Twitter

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