Reputation: 2051
I have the following code saved in a .jspf file:
<!-- include library files -->
<script src="jquery.js"></script>
<script src="icanhaz.js"></script>
<script type="text/html" id="user">
Hello my name is {{ name }}
</script>
<script type="text/javascript">
$(document).ready(function () {
user_data_object = {name: "Michael"};
<!--
This should set user to the string 'Hello my name is Michael'.
However, ich.user is undefined, so when I make this call, I get the error:
TypeError: 'undefined' is not a function
(evaluating 'ich.user(user_data_object)'
-->
var user = ich.user(user_data_object);
});
</script>
Why isn't this working? I tested to make sure jQuery and ich are being correctly included and they are. If I throw this code in a .html file on my computer, it works. However, once I throw it on my server in a .jspf file, it stops working. Any ideas?
Upvotes: 1
Views: 264