Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
1 | |
1 | |
1 |