i have a couple of questions:
first i want to describe the things i am using.
1) Dynamic project.
2) using tomcat - 7.
3) put the extjs folder in WebContent folder.
i am just learning the things ... so might be have some stupid questions .. sorry for that.
so i have confusion that ext-all.js not uploaded ...might be because of one of the reason...
1) Use of tomcat (instead i need to use apache) .... please give me some explanation on that.
2) i need to put extjs folder somewhere else ... (not sure about this).
Please help
May or may not be the answer.
Try putting ./ infront of the path
<script src="./extjs/ext-all.js" type="text/javascript"/>
You didn't include the location of your html file, so their is no way of knowing where you have to point the script tag to.
Hope this helps a little
Cheers,
Demetry
Related
I would like to use this library (https://github.com/riichard/boolean-parser-js) (which is really just a function?) in my own project.
My project is contained in a single html file. In one of the functions, I've tried including the following:
var parser = require('boolean-parser');
I get the following error when I include this.
Uncaught ReferenceError: require is not defined
I have installed the library via the terminal, using "npm install boolean-parser". At the same level as my project, I see a file called "node_modules", which contains "boolean-parser".
I'm not sure if this is the right method of referring to the library...
I'm also not sure how to find out what it.
If possible, please explain terminology in your answer(s)-- I have limited background knowledge in this area, as this is essentially my first real web project!
Happy to include code upon request. Feel free to suggest tag additions!
P.S. Could it be a file path problem? Do I need to use something like Browserify?
P.P.S. If I include
<script src="node_modules/boolean-parser/index.js"></script>
then it seems like the library is working, but then I get an error from within it:
index.js:295 Uncaught ReferenceError: module is not defined
at index.js:295
It is because you are making client side project. Here is related question link
Listen, i created simple html page with 2 script tags. First contains src="index.js" which is in the same folder and edited as i said before. Second script tags is:
<script>
console.log(window.module):
</script>
And everything works. Check yourself again.
I try to add a header to every js-file in my project.
The current files are without comments in header.
I want a gulp-task to insert following header to the files:
/*
* New Comment from Gulp-Task
*/
Is there a plugin, already ?
Gulp-Inject is maybe the solution, but I donĀ“t know, how to use it for javascript injection.
This is not a straight answer to your question as it requires some translation to your case, but here is a post on how to update version numbers (in your case, something else) within javascript files.
How to Increment Version Number via Gulp Task?
The second part to this answer is where you'll find your clue.
I found the solution that work for me:
gulp.src(['./**/*.js'])
.pipe(insert.prepend(license))
.pipe(gulp.dest('./'));
It prepend a license head to every .js files in this directory and sub folders.
Good Afternoon,
I am having a very specific problem with my Apache2/Ubuntu Setup, essentially, whenever I attempt to use "javascript" as a directory name, everything inside the folder is essentially ignored and when scripts or humans try to access files within the folder, they simply 404.
I have renamed the folder to "javascript2", and the files appeared. Named back to "javascript" and they disappeared when trying to navigate to them again.
I can't simply rename the folder as this is where mantis is calling, and besides, this shouldn't be happening.
Is it a reserved word? Do I have a stupid option enabled? Any suggestions / help is appreciated
This is the default behavior of Apache apparently, I had to comment out the following in /etc/apache2/conf.d/javascript-common.conf:
Alias /javascript /usr/share/javascript/
All is good now, thanks for the help anyway and hopefully this may be useful for someone else at some point!
I am using Dreamweaver CS6 (and most recently, CC).
We have a javascript file that is included in every page, but its dynamically included through nested layers of PHP includes, so when I type in a function name, DW does not know it is part of the page, and therefore does not give me the code hints (vs if I am actually in that js file, code hinting works like a charm).
I am looking for a way to have DW pick up that file and/or give me code hints for any functions and namespaces I place in there, but so far, have come up empty.
Has anyone had any success with doing this?
I have been searching for this answer for far too long, and I think I've found it! It has to do with "site-specific code hinting". Take a look at this link: https://www.inkling.com/read/dreamweaver-cs6-missing-manual-david-sawyer-mcfarland-1st/chapter-22/php-code-hints
It worked for me. I am now able to see all variables from nested includes.
I'm developing on top of OpenLayers.js. My project folder is structured as follows:
project /
|-- OpenLayers.js
|-- map.html
|-- map.js
\-- etc
As you can argue, when I start a new map project, I espect suggestions from Vim on how to complete the code, reading JS classes from all the libraries in the project folder (in this case, just OpenLayers.js).
E.g.:
map = new OpenLayers. --> <C-x><C-o>
map = new OpenLayers.Bounds
.Control
.Map
Selecting one of the suggested classes I should get a kind of autocompletion, like in Aptana. I've installed AutoComplPop and I get a nice automatic menu to select suggestions, but all of them are taken from the current JS file.
Anyway, I've correctly set up Tagbar + node.js + jsctags and I've generated tags file for my project, and added set tags=./tags,./../tags,./*/tags to my .vimrc.
In this case, also, Tagbar maps the current file JS structure but doesn't offer any mapping of the classes coming from other files.
Another probably relevant line in my .vimrc:
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
I'm struggling to get class and subclass suggestions and now I'm getting a bit confused with all the plugins/piece of software available.
Any hint?
Thank you guys :)
Check out YouCompleteMe and tern_for_vim.
Here's an article about using them together.
Your expectations are a bit too high. Vim is not an IDE like Aptana and the mechanisms used to provide completion are crude.
Did you check that your tags file has OpenLayers.Bounds, OpenLayers.Control or OpenLayer.Map? I can't find OpenLayer.Map and, going through the OpenLayer.debug.js I can't find this function either.
TagBar only works with the current buffer. If you want to show tags for other windows/buffers you'll need another older plugin: TagList.
AutoComplPop doesn't support JS out of the box. How did you set it up? Here is how I did but it still uses <C-x><C-o> while completion from tags is done with <C-x><C-]>.