msfs2020-toolbar-window-template icon indicating copy to clipboard operation
msfs2020-toolbar-window-template copied to clipboard

Some site doesn't show in CustomPanel

Open sgenta115 opened this issue 3 years ago • 4 comments

I'm trying to show my original html in the custom panel and I made simple html. css and js and saved local but custom panel doesn't show anything.

I changed url in "CustomPanel.js" if (self.iframeElement) { self.iframeElement.src = 'https://www.ipify.org)/'; }

But some page doesn't display and panel display blank.

Doesn't display https://www.yahoo.co.jp/ https://www.bousai.metro.tokyo.lg.jp/1009757/1020469.html Local html file.(Same directory as CustomPanel.html)

Displayed https://www.ipify.org/ http://abehiroshi.la.coocan.jp/

I just want to know the diffference between displayed site and didn't displayed site, and why local html doesn't work. And I'll be happy if tell me how to solve this problem.

Please excuse my poor English. Please give me a hand.

Thanks

sgenta115 avatar Nov 18 '21 01:11 sgenta115

Also curious, I'm having an issue displaying http://127.0.0.1:3000 simple test :(

TryTryAgain avatar Feb 11 '23 19:02 TryTryAgain

Same. In the MSFS debug console I see an error about: [Coherent GT] Failed to locate file vfs:///html_UI/JS/debug.js So I don't think the thing is fully loading? I didn't try it with the default webpage though so maybe I should have. I've just using this an as example to try and read web content from a local server running on localhost.

jwvanderbeck avatar Jun 29 '24 00:06 jwvanderbeck

So in some more testing, the window does properly display the default page, but not my page served by localhost. I know my page is served properly so must be something about the way the HTML is formatted or something.

jwvanderbeck avatar Jun 29 '24 02:06 jwvanderbeck

So i did get my localhost webpage showing this morning! Unfortunately given how long it takes to restarts MSFS And test, I made a bunch of changes at once so I'm not 100% certain yet which change was the important one but just to give some information:

  1. I changed the port from 8080 to 9001
  2. I added a and <meta charset="UTF-8"> to the header html
  3. Instead of being on the root URL IE http://localhost:9001, I changed it to serve to a page, IE http://localhost:9001/index.html

Pretty sure the first item has nothing to do with it, and it is in fact either 2 or 3 or possibly both. If I narrow it down more in subsequent tests I will update here in case it helps anyone.

jwvanderbeck avatar Jun 29 '24 13:06 jwvanderbeck