Michel Laplane Posted November 13, 2017 Share Posted November 13, 2017 Hi All, I've just made available a new github project for using BabylonJS with Microsoft Visio. It enables Visualization of Visio Diagram in 3D. https://github.com/MichelLaplane/VisualShow3DLight Even it is a very simple use for now, I'm faced with two problems : - How to disable the security warning when launching WebBrowser Control - How to call JS function that are in other file than the HTML landing page of the solution. Any suggestions will be appreciated. Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 13, 2017 Share Posted November 13, 2017 Hi! 1) What security warning are you receiving? 2) Including any JS in a <script> tag should execute it in the global context. Doesn't it work? Quote Link to comment Share on other sites More sharing options...
Michel Laplane Posted November 13, 2017 Author Share Posted November 13, 2017 Thanks for you interest. "(Translated from French) For helping you to protect your desktop, you web browser had blcoked the display of active content click here to enable". So the user needs to authorize access. Of course after that all is working well, but the user need to authorize again for the next session This is the normal behavior of Edge, but don't know if it can be disabled and best suitable by code. Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 13, 2017 Share Posted November 13, 2017 I remember this warning from ActiveX websites, I don't think I ever saw it with JavaScript Sounds like browser setting for me, which you cannot control. But I can't really give a proper answer, as I don't know the project. Maybe someone else know this issue better! Do you happen to have mixed content (ssl/no-ssl)? Might also be a problem with some browsers. Quote Link to comment Share on other sites More sharing options...
Michel Laplane Posted November 13, 2017 Author Share Posted November 13, 2017 For the second problem, to be more precise, if you begin to execute your script in the landing html using Script tag as usual, you cannot after that call a function in another file, event if you add the corresponding "script src = ..." that normally would include the js code of your other file. So I've done a trick, the execution flow is directly called in the main.js file. If I try in the html to call startView, the function is not defined, so I execute directly in another js file. So you would tell me where is the problem? In fact the problem is here again and is more annoying if I want to call a JS function from c# : in "FrmBabylonScene.cs" ... private void btnFloorPlanAll_Click(object sender, EventArgs e) { // This does not work because the function is not in the HTML File // Don't find a solution for that webBrowserBabylon.Document.InvokeScript("GenerateAll"); } You can look at the code in the GitHub repository : https://github.com/MichelLaplane/VisualShow3DLight Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 13, 2017 Share Posted November 13, 2017 Hello for your first problem, can you make sure to use a local weserver to serve your page. This error can happen when the content comes from the local file system For the 2nd question I could use a small repro Quote Link to comment Share on other sites More sharing options...
Michel Laplane Posted November 13, 2017 Author Share Posted November 13, 2017 Hi David, thanks for your help. Yes the index.html file is in the local file system. How can I make it force the usage of a web server and moreover will it be easy for the end user to use the solution as simply as to use a local file. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 13, 2017 Share Posted November 13, 2017 You will need to use .net framework httplistener to host the file I guess Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.