vjekob / controladdin-starrating

Custom Star Rating demo from NAV TechDays 2018
2 stars 1 forks source link

Issue with rich client? (Html load trick) #1

Open laguiz opened 5 years ago

laguiz commented 5 years ago

Hi @vjekob,

I tried to use your trick to load html from image resource to get a cleaner code but it looks like it does not work on rich client (works on IE and Chrome).

Note : On my lab the rich client is on Windows 10 with IE 11.

I can still create my components via JS like before but it looks very interesting to load from clean html file. Do you have any limitation in mind that could prevent this trick to work on rich client?

Any hint is welcome.

Thank you for this great example it's very appreciated.

laguiz commented 5 years ago

Looks like loadControlHtml() callback is not called on rich client : https://github.com/vjekob/controladdin-starrating/blob/d066dff57320400e98798c22ca10a71112fca875/Ratings/Scripts/loadHtml.js#L2

laguiz commented 5 years ago

Got a reply from @vjekob : It can’t work in the rich client. IE (which is embedded in the RTC) cannot use Ajax to load local file system files. In fact GetImageResource() try to load from local file system. Source : http://vjeko.com/abusing-images#comment-38916

vjekob commented 5 years ago

Sorry for my slowness here. GetImageResource() does not load a resource, it merely returns a path to the resource that the browser will use to load it. Browser can use these paths to load images for example.