Web Browser and Stylesheets

I just figured out what this style sheet problem is all about, as well as this related post.

The problem is when using Literal Mode with the Web Browser object. In this mode, Panorama thinks any text inside { and } characters is a Panorama formula. However, this is a problem if you have inline CSS, which also uses { and }, or embedded JavaScript, which also uses curly braces. These features were not working because Panorama was trying to merge in the formulas. Since the text inside the { and } was not a valid formula, it didn’t work.

The best solution is really to switch to formula mode. However, Panorama now checks for errors in merged formulas, and if it finds any, it disables all field and formula merging. In other words, if you have inline CSS or JavaScript that uses curly braces, merging will not work but the CSS/JavaScript will work. (In previous versions it was the opposite – merging would work but the CSS or JavaScript would not work.)

If you need to merge in data AND use inline CSS or JavaScript, use formula mode. I have updated the documentation to discuss this problem and the solution.


By the way, I didn’t set out to fix this old problem tonight. I was trying to use a web page with JavaScript, it wasn’t working, and after some false starts figured out what was going on. I then realized that this was the same problem that had been reported on this old topic (I did test to verify that it was the same problem).

So, if you want to use internal style sheets (or JavaScript) in a web browser object, you can start doing so right away. You don’t have to wait for the next release of Panorama X, just make sure to use Formula mode.