Page 1 of 1

Web Viewer with JS

Posted: Mon Dec 28, 2015 10:23 am
by c3rb
Hello there,

I'm trying to update a StiWebViewer from Javascript, everything seems to go smoothly until it gives an error when I debug with Chrome at this line :
viewer.renderHtml("viewerContent");

The specific error is : "Uncaught Sys.FormatException: Sys.FormatException: Format specifier was invalid."

And the error comes from "ScriptResource.axd" I just can't figure out what it is exactly that I'm doing wrong since this is a generated minified script file.

I only know for sure that the error is provoked by the line I mentioned "viewer.renderHtml("viewerContent");" because It disappears if I remove this line.

Thanks for your time.

Re: Web Viewer with JS

Posted: Mon Dec 28, 2015 2:20 pm
by c3rb
Okay so afer debugging in stimulsoft.viewer.js, it seems there is a conflict of format at this line :

"String.format("#{0:X2}{1:X2}{2:X2}"

I'm using Jquery that might be the problem but I don't really know why, in the meantime I'm replacing String.Format by another function of my own to convert rgb color to Hexadecimal color.

Re: Web Viewer with JS

Posted: Mon Dec 28, 2015 3:01 pm
by Jan
Hello,

Its a problem. We overload string.format function and this function used in our code many times.

Thank you.