cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
hogi
Level XII

interactive html in Teams Channels

I generated an interactive html in Jmp and included it in a MS Teams channel.

Unfortunately, instead of the graph, I just see the loading animation.
Same issue when I open the interactive html via the Sharepoint Web site.

 

Is it a sharepoint issue or a jmp issue?

Does somebody know why the interactive html behaves like this - can I change the Sharepoint settings?

 

hogi_2-1676527620608.png

6 REPLIES 6

Re: interactive html in Teams Channels

Hi @hogi , 

 

Thank you for starting this discussion. What you are trying to do is something that used to be available in file sharing applications, like OneDrive, GoogleDrive, and Drop Box, but they all eventually dropped support for it. I suspect one of the reasons could have been to avoid the responsibility of security risks in allowing the end user to open a web site with potentially harmful JavaScript code.  In response to this limiting users ability to share their Interactive HTML content safely and to provide JMP specific enhancements, we created JMP Live.  

 

I don't know if Teams Channels or SharePoint provide support for this capability, but it may be turned off by default.  

 

I tried a simpler html example than what JMP produces and found the following in the browser debugging console when trying to view it in SharePoint:

 

"Blocked script execution in 'about:srcdoc' because the document's frame is sandboxed and the 'allow-scripts' permission is not set"

 

I believe this is referring to the JavaScript code in the HTML file.  Unfortunately, I don't have access to a setting that allows SharePoint to grant this permission. It may be a setting available to the SharePoint administrator.  I suspect this would be the same with html pages with JavaScript output from any other application. 

 

I had less success with Teams Channels, since I was unable to open the browser console, but I suspect the same security restriction is limiting the display of HTML files requiring JavaScript to display.

 

Perhaps someone with more experience with SharePoint or Teams Channels administration would know how to enable viewing web pages using JavaScript in these systems.

 

~John

 

 

 

hogi
Level XII

Re: interactive html in Teams Channels

At the moment, when I want to share an interactive Jmp file via Teams or Sharepoint, my colleagues just see:

hogi_0-1695329618380.png

... and think that there is an issue with Jmp - or an issue with my Jmp file.

 

For them, it's hard to find out that actually it's a Teams / Sharepoint  issue with the interactive JavaScript code.

 

@John_Powell_JMP , for a future version of Jmp, would it be possible to slightly change the code of the interactive HTML?

Instead of starting right-away with the start animation,  the HTML code could check if Java Code can be executed and if not: show a warning that it's actually the browser or the site which prevents the page to be loaded correctly. Then it could show a suggestion to download the file and open it from the hard drive.

 

 

 

Jackie_
Level VI

Re: interactive html in Teams Channels

Having similar issue @hogi 

Re: interactive html in Teams Channels

Hi @hogi , 

Thank you for posting this question. To have it considered for a future release, please add a Wish for it in the JMP Wish List.  I have entered an internal wish for it, but votes on external wishes can help make things happen sooner. 

John_Powell_JMP_0-1695388440967.png

 

Please let us know if you do, then @Jackie_  and anyone else finding this post could vote on it. 

 

@Jackie_, thanks for letting me know that you would also like something like this if it is possible. 

 

Thanks, 

~John

hogi
Level XII

Re: interactive html in Teams Channels

Sure, I can do.

Here it is - ready for voting:
Interactive HTML - catch problems 

Re: interactive html in Teams Channels

@hogi , 

 

Thank you for creating and sharing the JMP Wish.

 

If you want to try something with the current version of JMP, the following is a general approach you can use to warn users that a file you want to share requires JavaScript to be enabled.

 

You can create a wrapper HTML file for the file you want to share that includes a warning and share both files. Then, figure out a way to stop colleagues from opening the original file you want to share.

 

The content of the wrapper file will look like the following.  You would need to set the iframe src attribute to the name of the html file that contains JavaScript code.

 

<html>
<head></head>
<body>
<noscript>
    <h1>
        You are trying to open this JMP Interactive HTML file in an environment where JavaScript is disabled!
    </h1>
    <h2>
        Please download the file and open it in a web browser with JavaScript enabled.
    </h2>

    <style type="text/css">
        #main-content { display:none; }
    </style>
</noscript>

<div id="main-content">
    <iframe width="2000" height="2000" src="./Big Class - Bivariate of weight by height.htm" aria-label="JMP Report" class="jmp-live-iframe" style="margin: 0.8em 0px;"></iframe>
</div>

</body>
</html>
 
JavaScript is pretty common for web pages and there are many applications that produce web pages these days, so I'm surprised that content sharing applications do not have this built in. 
 
We make it easy to share a JMP Interactive HTML file from JMP Public on the JMP User Community using a similar iframe technique. 
 
Hope you find this useful.
~John