"Ext is not defined" issue in ExtJS 4 - javascript

I came across a "Ext is not defined" issue in ExtJS 4.
I am actually testing the example here to starting learning ExtJS 4.
I have my example script file included:
<script type="text/javascript" src="orderRead.js"></script>
<script type="text/javascript" src="order.js"></script>
as well as these ExtJS script files:
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript" src="extjs/ext-all-debug.js"></script>
but the problem is still there. Attached is the error message from Firebug:

Put the script tags for the Ext library before the script tags for your example files, so that they are loaded when your code runs.

You should include the ext-base.js and ext-all.js files in following order.
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script>

Related

index.HTML does not recognize script in folder (chrome)

I am creating a browser based game with phaser, which involves linking to an external javascript file with my own code in it. For some reason when I use either
<script type="text/javascript" src="/js/main.js"></script> or
<script type="text/javascript" src="js/main.js"></script>
to link the javascript to the HTML, no 404 is thrown but the script does not run. However, if I move main.js to the root directory and put
<script type="text/javascript" src="main.js"></script>
in the exact same spot, the script runs fine. Any theories as to why this is? I am using chrome version 57.0.2987.133. Thanks in advance!
It should be:
<script src="./js/main.js"></script>
You had a simple scoping error and forgot the script's src.

Issue with jquery when using is.js

My jquery throws a bunch of errors, when using the library is.js in my HTML. Which thus brings up problems with bootstrap. is.js has browser detection features I need to make this update compatible with all browsers. My code it formatted correctly so I dont need to share that. But here are screenshots
Without is.js included in HTML:
With is.js included:
See the difference is that it does not show up when is.js is included. But I need it to be compatible with all browsers.
Errors it causes Jquery to throw
jquery.js:2090 Uncaught TypeError: matchExpr[type].exec is not a function
jquery.js:5932 Uncaught TypeError: value.call is not a function (Recently called after I moved the location of the library above Jquery - void for now)
New order of scripts
<script type="text/javascript" src="js/is.min.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
(Tosses that new error)
Old order of scripts
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/is.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
Tosses only the first error

Twitter bootstrap not working from local files

When I include my script like this - loading bootstrap.min.js from a local file on disk, it does not execute my browser code.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/bootstrap.min.js" </script>
I know it can find the file, because if I introduce a misspelling in the file name, Chrome complains, but otherwise not. Same behavior from IE-Edge by the way.
However if I include from the cdn network like this:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
Everything works fine. The setup was suggested in a Coursera course on bootstrap and seems to work for most people, but not all. I am kind of puzzled. Is there a browser/internet setting that is preventing me from executing bootstrap from the disk or something that I am missing?
just change
<script src="js/bootstrap.min.js" </body>
To
<script src="js/bootstrap.min.js"></script>
You probably have not closed your code
Here
<script src="js/bootstrap.min.js" </body>
should be
<script src="js/bootstrap.min.js"></script>

showing jQuery is not defined even though jQuery file loaded

I am working on angular.js application in that I have loaded jQuery file still it shows error message
Error
Uncaught ReferenceError: jQuery is not defined(anonymous function) # popup.js:1
Files loaded
<script type="text/javascript"src="js/jquery-1.11.3.js"></script>
<script type="text/javascript" src="js/angular.js"></script>
<script type="text/javascript" src="js/angular-ui-router.js"></script>
<script type="text/javascript" src="js/angular-resource.js"></script>
<script src="js/app.js"></script>
<script src="js/appCtrl.js"></script>
I am not getting when is this popup.js is from.
Can anyone suggest me how to get rid of this error?
Move the jquery js reference to head tag or above the popup.js reference.
If you are working in laravel then add your CSS and Javascript file in index instead header and footer

Issues using FuelUX with Foundation

I have a project built on top of Zurb Foundation, now I need to use some FuelUX components such as "wizard" and "tree". For that I include Twitter Bootstrap library (2.3.2 version downloaded from Bootstrap site) and also include "all.min.js" from FuelUX, when I use the same HTML markup as come in index.html but for some reason it doesn't work. So I tried to fire the plugin using $("#MyWizard").wizard() and get this error:
TypeError: $(...).wizard is not a function
$("MyWizard").wizard();
Any ideas in how to get this work?
How I include scripts
This is the order in which I include scripts:
<script type="text/javascript" src="/bundles/product/js/bootstrap/bootstrap.min.js?0.1"></script>
<script type="text/javascript" src="/bundles/product/js/fuelux/all.min.js?0.1"></script>
<script type="text/javascript" src="/bundles/stock/js/jquery-impromptu.js?0.1"></script>
<script type="text/javascript" src="/bundles/product/js/product.js?0.1"></script>
<script>
$("MyWizard").wizard();
</script>
This was also posted to https://github.com/ExactTarget/fuelux/issues/259 and from what I'm seeing, being careful to follow the instructions at https://github.com/ExactTarget/fuelux/wiki/Using-Fuel-UX#simple-integration-into-a-page should straighten things out. Hope this helps!

Categories

Resources