JavaScript is the original and common name applied towards most flavors of a scripting language that originated on NetScape Navigator. Use this tag for questions regarding common implementations of ECMAScript, JavaScript, JScript, etc. JS does not typically refer to its ECMA-cousin, ActionScript.

learn more… | top users | synonyms (1)

2
votes
0answers
56 views

moving around virtual keyboard

I'm creating virtual keyboard using javascript/html/css. And I can't find a good algorithm for moving from one button to another in different directions (top-bottom, left-right). Lets say I ...
-2
votes
0answers
23 views

Preparing for MS Exam 70-480 “Programming in HTML5 with JavaScript and CSS3” [on hold]

Context: I want to take the MS exam 70-480: Programming in HTML5 with JavaScript and CSS3. I don't want to just pass the exam, I want to actually learn about these topics to use them in my every day ...
5
votes
0answers
91 views

Which languages have the best support for stackful coroutines? [on hold]

Various languages support (some flavor of) coroutines. One way to discriminate coroutines is whether they are stackful or not (terminology based on Ana Lucia de Moura; Roberto Ierusalimschy (2004). ...
0
votes
1answer
269 views

Dynamic query in Mysql

I'm doing a J2EE web application with Struts2, Mybatis and a MySQL database, so what I want to allow to the user is to be free to choose different parameters to perform a select to a table in the ...
-1
votes
0answers
50 views

Why is there such a push for client side frameworks nowadays? [on hold]

I'm failing to understand why I want to involve my websites with client side frameworks like Angular, Backbone, Ember, React, this, that or the other. The fact of the matter is why learn something ...
-2
votes
0answers
30 views

Second AJAX call unloading result of the first [migrated]

<script> var result; function init(){ var name = window.name; name = name.split(","); getCompany(); setTimeout(200); ...
-2
votes
0answers
45 views

OEM/developer licences for javascript library dependencies

I'm building a JavaScript library which I'd like to provide very similarly to Highcharts (free for non-commercial only). The core functionalities of this library will have no dependencies (except ...
-6
votes
0answers
45 views

Need help on a daily basis [on hold]

The Valutazione(){} function doesn't work, could you help me please? <html> <head> <title>Questionario</title> <link rel="shortcut icon" ...
2
votes
1answer
539 views

How can I keep Web services requests in a DAO layer without tying the code to the DOM?

I'm working on a single page application on the node-webkit desktop app platform, which means 99.9% of all of the logic is written in JavaScript. Since this is a reboot of a project we're working on, ...
-1
votes
0answers
22 views

How to use Extjs with Spring

I'm so sorry if my question seems to be so simple, but i'm stuck i'm starting to work in a project involving Spring MVC, Extjs 5 and ExtDirect for binding, the guides of extjs recommends using Sencha ...
0
votes
3answers
147 views

URLs in javascript in the browser

We are trying to continually improve our source code base and a question came up recently which throws open a new area to improvement. Where best to put URLs that are needed in JavaScript? Do we put ...
4
votes
1answer
137 views

Why is the use of JavaScript in HREF attributes discouraged?

Disclaimer: I came to Programmers.SE to ask this question because I understand this is the place to ask this type of question, and not necessarily stackoverflow. If I am wrong, please close the ...
0
votes
0answers
4 views

How can I make this custom dual nav responsive and fixed at the same time? [migrated]

I have a client that want's two custom nav menus stacked on top of one another and under a slider with their logo in the center. They also want the menus to be fixed upon scroll. I have executed this ...
0
votes
2answers
58 views

What are the advantages of using async JavaScript modules (like AMD) for traditional sites?

This is specific to JS in the browser for a traditional multi-page site (i.e. not a single-page app). For single-page apps, the advantages are pretty clear: the main view page is going to be ...
2
votes
1answer
75 views

Callback functions: Semantics and maintainability, when they aren't necessary [duplicate]

Within the context of JavaScript/Node.JS; Will using Callback functions improve the maintainability of source code, when there is no need for async programming? For example does the plain code sound ...
1
vote
1answer
137 views

Methods for structuring JavaScript SDKs

I've built a REST API and have been using Backbone models throughout a couple different applications to communicate to it. I would really like to build a single JS SDK that can be used in any ...
0
votes
1answer
75 views

JavaScript strict mode compatibility

While reading about strict mode on MDN I really was surprised to read the following near the end of the page, quote: Browsers don't reliably implement strict mode yet, so don't blindly depend on ...
-2
votes
0answers
39 views

How to change every 2nd and every 3rd element in an array? [closed]

Here is my dilemma, I have this code: var fibs = [1, 2]; for (i = 0; i < (window.innerWidth / 50); i++) { if (fibs.length < 15) { var n = fibs[i] + fibs[i + 1]; ...
-3
votes
0answers
23 views

Regarding publishing game for Facebook [closed]

I am making a game on cocos2d-JS for facebook , I have some technical doubt which I want to clear What is the difference between Facebook Canvas & Facebook Web project . Facebook Canvas ask ...
4
votes
1answer
117 views

Are promises suitable for Model Controller communication?

I have an Express app built with the Yeoman Angular fullstack generator to build an API to send JSON to Angular. I'm trying to work out the best way to pass back information from my model to my ...
-2
votes
0answers
40 views

Beginner HTML5 path/to/jsFile. Unable to load script? [migrated]

I'm having some trouble running some JS inside a html5 body. Here's what's happening, whenever I remove all instances of the arrays from the JS file I am using, the script loads fine in the index ...
-2
votes
0answers
25 views

What are some websites that use ASM.JS? [closed]

Are there any websites out there using ASM.JS? PLEASE do not include websites that primarily have the use of WebGL or any game websites.
0
votes
0answers
35 views

Managing Login Authentication/Webpage session: Can client side javascript/JQuery access either a session variable or json variable in html?

Short version: A variable is stored in a session variable req.session.userName and also in the json sent with res.render('/', {username: value}). How can I access either of those variables from inside ...
1
vote
1answer
45 views

How to introduce Google Analytics code in a modular way?

We are working on a very large codebase. It's basically a web-based operating system, with its own file system and applications. The system's UIs are generated dynamically with Javascript. We've ...
-2
votes
0answers
57 views

How to improve programing skills? [closed]

I do a apprentertice. I program with javascript. I have programming for 6 weeks in the company. But I worry about my programming logic. I want to improve my programming logic. I should sort a Array ...
-2
votes
0answers
32 views

JavaScript interpreters? [closed]

Okay so I have just started learning JavaScript less than a week ago and I love it. I have never done any kind of programing before. I have been using code academy for some lessons and I am ready to ...
0
votes
1answer
109 views

Programming CPU Emulator Functional Style [closed]

I want to write an 8086 CPU emulator in javascript, functional style. How would one conceptualise / design an 8086 emulator, or any CPU emulator that has registers and realmode memory access in a ...
0
votes
0answers
55 views

Naming self or this something else, a good idea?

I'm finding that my code becomes more readable when I make a local reference to this/self, and/or call it something that makes sense in the context. "self" or "this" doesn't really indicate what kind ...
-2
votes
0answers
22 views

Not getting value in second cycle of when returning to form 1 from form 4 in java project [closed]

I am working on a java project, where i had created 4 jsp forms. On first form i had a select box. I select a value from option. Then I go to form 2,3 and 4,here the selected value is disabled. From ...
0
votes
1answer
61 views

Why do browser Javascript libraries pass the window object as an argument?

While looking at various JavaScript libraries, I have noticed a relatively common practice of passing either the window or the document object as part of the arguments given to the library ...
1
vote
2answers
306 views

Application use on website

Is there a good way to run a C# application on clientside in lieu of JavaScript? I have done some front end work with JavaScript and backend C# for web developing at an old job, but I am interested in ...
3
votes
2answers
2k views

Every function is a closure?

Wikipedia says, that closure - is a function, which has an access to variables, declared outside of the function. There is even an example: function startAt(x) function incrementBy(y) ...
0
votes
1answer
2k views

Can jQuery be used server side? [closed]

I know that you can use JavaScript server side with node.js, but can we use jQuery for backend as well?
1
vote
2answers
139 views

Live search/filter as you type in client approach

As an exercise for myself to practice my JavaScript "skills" I'm trying to write a client-side filter. It should be able to filter "content blocks" as the user types. By "content block", I mean a ...
0
votes
0answers
29 views

Get element constraint [migrated]

I've been working recently with very nested HTML elements. Sometimes, an element's size is constrained by a parent element several levels up, or more. Finding the constraint can be tough. An example ...
3
votes
1answer
110 views

How to tell that a Javascript code already needs AMD (RequireJS, …)?

At some point code is complicated less if you introduce a new abstract than if you continue as it was. Some trigger should fire in a head of a programmer. Like, I was coding fine, but now I've added ...
0
votes
1answer
222 views

Is possible to create and download a video file via JavaScript, only on the client side?

Is possible to create and download a video file only on the client side? Suppose that we have an animated canvas like in this JSFIDDLE. Please see this snippet: ... var stop = false; ...
-1
votes
1answer
47 views

Detect touch sizes on screen

Is it something possible to detect touch boundaries on a screen? My real question is relative to Javascript and Touch Events, but even speaking of common software (a regular application rather than a ...
1
vote
0answers
72 views

Can/should objects share methods in certain circumstances?

I am currently working on a web application that is supposed to resemble an operating system with GUI (it manages processes and windows). I have several constructors which deal with different aspects ...
-3
votes
0answers
11 views

how to display database with javascript in the form of a table? [migrated]

I have problems with my application that is when it will display the data from the database in the form of a data table that happen to two sideways instead of down main.js ...
2
votes
1answer
203 views

Local Updates in Persistent/Immutable Data Structures

I'm getting into ReactJS and am intrigued but also confused about persistent data structures. I love the idea, but I'm not sure how to take my MV*, Mutable, Observable Bindings experience in designing ...
1
vote
3answers
283 views

Checking at javascript level vs checking in PHP?

Setup: We've got a form with default text values present within the text box itself which "goes away" when I click on them and enter a value (not if I dont enter a value). Currently the 'default' ...
-1
votes
0answers
24 views

Javascript component (de)composition [duplicate]

I am currently in the process of building a distributed application, containing mobile devices, a backend/server and webclients with javascript, using MQTT as event bus. When researching the ...
3
votes
1answer
111 views

Functional programming pattern for async JavaScript code

I have adopted a pattern in one of my projects that I really like and I suspect it's likely to be something standard. I'd like to describe it here and see if you guys can tell me how other ...
0
votes
2answers
70 views

memory needed to store a function in javascript

I have been using sizeof.js to investigate the size of various objects in javascript. It appears from this that the size of a function is essentially zero bytes, regardless of how many instructions ...
-1
votes
0answers
16 views

Chrome Console on android [migrated]

Is it possible to open chrome browser console with an Android? (Like S4) is it possible to do so with Java? I tried going into the settings and such, but is it possible to access the console and ...
2
votes
3answers
169 views

Which of these is the better way to structure functions in JavaScript?

I am new to programming (self teaching Javascript so I am missing some of the basics). I'm not sure if this falls under a style or best-practice question. When writing a function that will be used ...
-1
votes
0answers
32 views

Problem with node.js and server.js [migrated]

I'm a bit stuck right now, and hoping someone can shed some light. I'm relatively new to sockets in general, but have been programming in javascript on and off for several years, although only about ...
1
vote
1answer
56 views

How to debug minified javascript on production? [closed]

I have a front end single page app deployed on S3. It is minified on production. It creates error only when it is minified via grunt on production. I cannot repro the issue in dev. How do I go about ...
1
vote
1answer
95 views

Should I use composition or inheritance for sharing configuration items?

I'm working on a fairly new project where I'd like to share some config items used by a JavaScript plugin. Specifically, the project is using jQuery dataTables and I want to find a good way of sharing ...