Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello everybody
I want to know if it is possible to open a new powerBI report when the user clicked on a custom visual ?
var elements = document.getElementsByClassName("class");
for(var x=0; x<elements.length; x++)
{
elements[x].addEventListener("click", function(e) {
window.top.location.href = url;
});
} I got the following error :
Refused to display 'https://myurl.com/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
So I know the header depends of the owner but I wonder if I missed something else ?
Thanks
So far, I do not find an available way. You may submit an idea.
I am able to display hyperlink with this code:
'<a onclick=parent.postMessage("childframe","*");> '+ click here +' </a>'
But when i click on 'click here' it doesn't transfer the message even if the event is reached
window.addEventListener("message", function (event) {
console.log(event.data); //display data but not the parameter
});
Update
With this
'<a onclick=window.postMessage("childframe","*");> '+ task.typeDate.type+' </a>'And this code :
// Create IE + others compatible event handler
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
var eventer = window[eventMethod];
var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";
// Listen to message from child window
eventer(messageEvent, function (e) {
console.log('parent received message!: ', e.data);
}, false);I can see my parameter but the origin source is unknwon so it is not safe at all
You could also reach out for help on GitHub and keep an eye on Custom Visuals blog for the latest info.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |