Hello,
I am using the HTML Block in my Dashboard and basically I am trying to have 3 dropdownlists and a button that trigger a losant workflow, my concern is that whenever I clicked on the dropdown lists to select an option the block loaded and changes to the main dashboard page, also I am having this error in my browser debugging console: Uncaught DOMException: Failed to read the ‘localStorage’ property from ‘Window’: The document is sandboxed and lacks the ‘allow-same-origin’ flag.
Appreciate your help and Thanks in advance !
Hi @CHAIMAA_DRIOUECH,
I have just a couple of questions to allow me to assist you further.
I will confirm with our engineering team, but I suspect the localStorage
property is intentionally unavailable. With this, what are you trying to access or set?
Above, you wrote:
whenever I click on the dropdown lists to select an option, the block loads and changes to the main dashboard page
When you say this, what do you mean by main dashboard page? Could you include a screenshot or example of what is happening when you select an option?
It sounds as though you are making a custom version of the Input Control Block using the HTML Block. Could you share a bit about your use case? For example, what functionality did you add to customize the block?
Thanks so much!
Julia
Hello @Aidan_Zebertavage,
Please find attached 3 screenshots of my dashboard, screenshots0 is the home page of my dashboard for vibration sensor which I called main dashboard page, screenshots1 is a zoom in my HTML Block that includes 3 dropdownlists and a button to give the user the ability to select the parameter of his snapshot request (sample, time and internal accelerometer) and then press the button Request Snapshot to trigger my workflow, screenshots2 is the result of a selection or should we call a change in any of the 3 dropdownlists, you can see that the HTML Block switches its result to the Home page inside the HTML block, so we get double view of the dashboard itself in the home page and inside the block itself.
Please let me know if you need further explanation.
Appreciate your help !
Oh Hey @JuliaKempf, I am sorry I thought the response was coming from Aiden, Please forgive me, Do you see any of my point in the last post ?
Thanks!
Hi @CHAIMAA_DRIOUECH,
After digging into the original error you reported:
Uncaught DOMException: Failed to read the ‘localStorage’ property from ‘Window’: The document is sandboxed and lacks the ‘allow-same-origin’ flag.
For security purposes, localStorage
isn’t supported in the Custom HTML block. However, I did offer an alternative in another forum post that I think is related:
Hi,
Thanks for your response, I have another question regarding HTML Block, is it possible to trigger a workflow from a button click in the HTML block.
Thanks!
@CHAIMAA_DRIOUECH,
Yes, you can communicate with a workflow via HTTP. The two methods I’d recommend are Webhooks or Experience Endpoints. Both can be used to trigger workflows.
If you’re a custom HTML block, you would have to make an AJAX request to a webhook or Experience Endpoint. This will trigger a workflow.
If you’re new to experiences, here is a good walkthrough: