Forum Discussion
- Ian_TurnerQrew CadetI am getting an error
GET https://login.quickbase.com/js/mustache-0.5.0 404 (Not Found)
when the script that is trying to be loaded is referenced at www.quickbase.com in the code. - Ian_TurnerQrew CadetFixed - Typo in script reference.
- _anomDiebolt_Qrew EliteMaybe one of these URLs is what you want:
https://login.quickbase.com/js/mustache-0.5.0.js
https://assets.quickbasecdn.net/res/75807-10/js/mustache-0.5.0.js
Note the CDN URL has a release number in it (75807-10) and will eventually go stale as QuickBase pushes out new releases. This is why some of my demos break over time. It might be better to pull the library (1) from a code page where you can completely control the library version or (2) from a public CDN whose URL does not change. - Ian_TurnerQrew CadetDespite referencing https://www.quickbase.com/js/mustache-0.5.0.js in the page code
I still get unsafe script warnings for http://www.quickbase.com/js/mustache-0.5.0.js
so I assume that the server that stores this is not running a current SSL cert - Ian_TurnerQrew CadetCDNJS have a secure download for the mustache.js library at
https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.3.0/mustache.min.js
or
https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.3.0/mustache.js - _anomDiebolt_Qrew Elite>I still get unsafe script warnings for http://www.quickbase.com/js/mustache-0.5.0.js
You are using mixed content here - the error should go away if you use https instead of http.
Also if you are using Mustache on a QuickBase page Mustache is already loaded! To prove this just paste code into the console:var person = {
firstName: "Christophe",
lastName: "Coenraets",
blogURL: "http://coenraets.org";
};
var template = "<h1>{{firstName}} {{lastName}}</h1>Blog: {{blogURL}}";
var html = Mustache.to_html(template, person);
console.log(html);
// output: <h1>Christophe Coenraets</h1>Blog: http://coenraets.org - Ian_TurnerQrew CadetThe interesting thing was that I had the https in the script reference on the page and was getting the mixed content warning.
I am using the Pages section of the App to create HTML pages - if I omit the script reference it just tells me Mustache is not defined.- RobertScaliseQrew CadetI just started working with Mustache and I also get a Mustache not defined message if I do not include it. This works when referencing
https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.3.0/mustache.js
<script>
var view = {
name : "Joe",
occupation : "Web Developer"
};
function loadtemp(){
var output = Mustache.render("{{name}} is a {{occupation}}", view);
document.getElementById('person').innerHTML = output;
}
</script>
<body onload="loadtemp()" >
<p id="person"></p>
</body>