-
1. Re: Getting error for JS-API as "Parser Blocking,Cross-Origin script".
David Li Feb 22, 2017 7:32 AM (in response to Test Bi)Hi there! This isn't an error, it's just a warning. I just disregard this notice on my API applications.
-
2. Re: Getting error for JS-API as "Parser Blocking,Cross-Origin script".
Test Bi Feb 25, 2017 10:19 AM (in response to David Li)Hi David,
This is warning but, document.write() written into the script, is blocked by the browser for security reasons.
To resolve that issue, I have directly used the JS which is being called by the javascript.
Also, I am facing another issue, after requesting report url, viz should be showing login page as user is not logged into the server.
Viz does not show anything.
-
3. Re: Getting error for JS-API as "Parser Blocking,Cross-Origin script".
David Li Feb 27, 2017 9:06 AM (in response to Test Bi)For the issue with the missing login page, the issue is actually that (for some weird reason) the API renders the login page as a 0 x 0 iframe. There are a couple ways to fix this:
1) You can set a default width and size in the options object of the Tableau.Viz() instantiation method.
2) If you don't have any other iframes on the page, you can use JS to resize all the iframes, thus making the login iframe visible.
document.querySelectorAll('iframe').forEach(elem => elem.setAttribute('style', 'width:100%; height:100%; visibility:visible;'));