Join the Stack Overflow Community
Stack Overflow is a community of 6.6 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I have this code on my page and i want to display a graph but I get an error ReferenceError:initialize is not defined and also google is not defined. which means that something is wrong on my initialize() function. Here is the complete code on plunkr. http://plnkr.co/edit/x1Ai9ynZuZclP11VEV0m

Here is the part i know is giving me error

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script src="http://static.loanstreet.com.my/assets/calculator/calcpack.js" type="text/javascript"></script>

  <script> 
    $(document).ready(function(){
      initialize(); 
      mainFlow();
    })
  </script>

My aim is to get this similar result http://loanstreet.com.my/calculator/home-loan-and-entry-cost-calculator minus all the css stuffs.

Does anyone know what I am doing wrong? I read somewhere to do this but it still gives me error. <body ng-app="IpadAppApp" ng-strict-di>

Any help appreciated.

share|improve this question
    
script.js appears to be an empty file in the plunkr you linked – nickgraef Feb 12 '15 at 5:11
    
thats bcos script.js is empty @nickgraef – Kingsley Simon Feb 12 '15 at 5:54
    
Well there's your problem (or rather, one of them). There is no angular module named "IpadAppApp". Your source also doesn't appear to load jQuery, so $ will give you a ReferenceError. On top of that, it looks like you're stealing the calcpack.js code, which has been intentionally obfuscated to prevent such a thing. – nickgraef Feb 12 '15 at 6:50
    
thnks @nickgraef for nthg. if u dont understand the code u ask. all scripts have been populated in the plunkr. i never referenced or included script.js in any of my scripts. do u want to take my laptop to see if there is a module called IpadAppApp? anywys my issue has been solved. – Kingsley Simon Feb 12 '15 at 13:26
    
The initial version of your plunkr had <script src="script.js"></script>. You're welcome for pointing out two coding errors and one bad ethical practice. I'm glad to hear your issue was resolved. – nickgraef Feb 12 '15 at 17:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.