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)

-3
votes
0answers
34 views

What's the prospect of Web development using JavaScript? [on hold]

Is Web application development a good career? Is JavaScript a good programming language? Will Web application development be a trend of software development?
-5
votes
0answers
22 views

About Files converted From OCR? [on hold]

Is there any software or process to find the OCRd files? If anyone have idea on this please reply asap.
2
votes
2answers
134 views

Algorithm and data structure to match groups of users (1-5 each) into 2 balanced sets of 5 users

I'm building a matchmaking queueing service for a 5v5 team-based game. I have a large set of users that are grouped into unique lobbies comprised of 1-5 users each. Each user has an integer based ...
1
vote
1answer
96 views

Ideal export in terms of size for asynchronous module definitions in JavaScript?

When creating AMD modules you can export whatever you like whether it be an object or a function. I vaguely recall reading a recommendation somewhere to export just one thing; the idea being "keep it ...
2
votes
2answers
270 views

Testing a very specific function in a large, complex application

I'm new to testing but wholeheartedly realize how important it is. The main issue is that my company has no top-down support for testing at all. That is we don't have any unit testing and just a bit ...
0
votes
0answers
58 views

Is it possible to cast Javascript anonymous object to a typed object? How? [migrated]

I'm looking for a way to cast JavaScript anonymous object to a typed Object, ... Using MooTools library (You may create them manually or using other tools), i defined several type, and then Using ...
-3
votes
2answers
237 views

JavaScript form validation without clicking submit button [closed]

I want to validate a form using JavaScript before user clicks the submit button. <form role="form"> <div class="form-group"> <label for="email">*Email ...
-4
votes
0answers
33 views

What Are The Benefits Of Coding A Website From Scratch? [on hold]

please what advantages does a website written from scratch have over the one done by CMS. Does a web developer just choose to use CMS at his own volition, or is it always at the client's request? ...
1
vote
0answers
54 views

How to avoid tying these two methods together with global mutable state?

I'm in the process of reading Code Complete 2 and learned that using global state is a no-no. What can I do to avoid using global state in this situation? Some background information: I have two ...
13
votes
5answers
3k views

Why is JavaScript not used for classical application development (compiled software)? [on hold]

During my years of web development with JavaScript, I come to the conclusion that it's an incredible powerful language, and you can do amazing things with it. It offers a rich set of features, like: ...
7
votes
3answers
3k views

Is Node.js “considered” to be its own programming language? [on hold]

Whenever I read blog posts about a new app that had Node.js involved, bloggers often write "the app was written in node." But I hardly ever see a phrase going like "the app was written in JavaScript, ...
0
votes
0answers
37 views

Static classes vs prototype classes whats the difference really

I am manage to create both static and prototype classes in this JS code, Keeping in mind that I will always need 1 instance of prototype class "Fruits" here, what benefit could I get over static ...
-5
votes
1answer
50 views

Logging implementation in Javascript [on hold]

We are planning to write logging statements in JavaScript. I got to know from various sources that write logging statements in a file on client side machine(Using Log4js) is security violation ...
5
votes
1answer
2k views

How should I structure modules in an Angular.js application?

I am fairly new to Angular.js, and one that confuses me is how to best use modules in an application. It seems to me that modules can contain any of the other common constructs in AngularJS ...
1
vote
1answer
103 views

html/css/javascript for game ui's

I've been looking into game ui's recently. My conclusion is that html/css/javascript would be the perfect solution IF it was wrapped up in a nice C++ library that allowed for easy integration into ...
0
votes
1answer
28 views

maintain rate of animation with requestAnimationFrame

I've noticed that HTML game developers are recommending the use of requestAnimationFrame as opposed to a timer for the animation loop. I understand that this can be optimized by the browser, but how ...
1
vote
1answer
39 views

Clear JQuery Listeners Before Ajax Load of Similar Data

I have a tree structure on the left side of my page from which the user can drill down and select items. Each branch has similar items. When clicking a leaf node, I make a JQuery .load(...) call that ...
2
votes
2answers
89 views

What's wrong about extending a class with prototype methods?

I was at a bar last night with a few of my colleagues. They said that it's a bad idea to extend the functionality of basic JavaScript Objects with a prototype method. For example, let's say you ...
1
vote
2answers
826 views

Multi-Threaded JavaScript?

I know, I know--it isn't possible presently BUT my question is this: Would it be possible to write a browser plug in for the major browsers that enables true, multi-threaded JavaScript? It just ...
10
votes
4answers
5k views

JavaScript Multi Threading

Well these days JavaScript is main player in all web development technologies , on client side for making user interface better, client side logic, on some web servers as server side logic also Add ...
2
votes
1answer
61 views

Javascript unit testing - mocks or fixtures?

Interested in some opnion... I'm introducing unit testing of JS into a team, it'll largely be testing modules with many dom interactions and updates. Traditionally I've always used mocks and spys ...
3
votes
1answer
184 views

How do I design a Javascript Object to not use any public properties?

I have been playing with the Object creation outlined by Douglas Crockford in his new talk "The Better Parts" function constructor(spec){ var that = otherConstructor(spec), member, ...
1
vote
1answer
106 views

Managing Massive Updates with Resource Access

I have a number of data servers that are pushing data to a main server as in this kind of architecture: These data points (points for short) are updated randomly from each server. On the server, ...
1
vote
6answers
691 views

Is blocking an entire web-client due to compatibility a reasonable request?

A little bit of background, we've made an electronic POS system for registered vendors of items of a well known brand. The vendors are required to login to use the system. Recently, IE has been ...
-2
votes
0answers
43 views

Javascript function scope [closed]

i'm editing an ascx where i have a modal popup with a radio button. when the radio value change i want to call a javascript function, but the function is not working. Here is the code: ...
8
votes
3answers
1k views

Does it make sense to use jQuery in modern-webkit-only web applications?

I'm lately working on a few mobile web apps for Android (2.3+) and iOS (4+). Their browsers support most of ECMAScript5, which is very powerful, and I wanted to use language features where possible, ...
1
vote
1answer
65 views

JS Async: . Can I forget callbacks all together and replace with promises and/or generators

I've been using Nodejs and I really dislike callbacks (as i think most people do.) I'm starting to learn about promises and generators. Both are a lot cleaner and I'd like to forget the horrors of ...
2
votes
2answers
118 views

Client-Side JavaScript Business Logic in .Net Solution Stack

Fellow developers on other teams I interface with seemingly question my judgement calls as they pertain to the placement of coded business logic in a .Net MVC/Knockout web application currently under ...
8
votes
2answers
4k views

Find the new coordinates using a starting point, a distance, and an angle

Okay, say I have a point coordinate. var coordinate = { x: 10, y: 20 }; Now I also have a distance and an angle. var distance = 20; var angle = 72; The problem I am trying to solve is, if I want ...
1
vote
2answers
218 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 ...
13
votes
2answers
2k views

How Do News Websites E.g. Forbes / Zdnet Seamlessly Merge One Webpage into Another?

If you go to E.g: http://www.forbes.com/sites/adrianbridgwater/2015/06/12/why-technology-has-to-be-continuous/ OR ...
2
votes
1answer
64 views

How to research API usage?

I'd like to find out how often and if a certain pattern in a certain programming language is used. In my case - I'd like to find out how many/if people do eval("/"+regexString+"/") in JavaScript ...
212
votes
3answers
75k views

Pros and Cons of Facebook's React vs. Web Components (Polymer)

What are the main benefits of Facebook's React over the upcoming Web Components spec and vice versa (or perhaps a more apples-to-apples comparison would be to Google's Polymer library)? According to ...
76
votes
14answers
8k views

Is my mentor's concern for code quality excessive? [closed]

To tell you a little about myself: I'm a newbie programmer working internships and learning a lot from experienced programmers. I can't believe I used to think I was good in college. The one I'm ...
2
votes
1answer
412 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 ...
0
votes
1answer
93 views

Measure and locate areas of similar value in an image

I saw this picture online and wanted to see if I could create an algorithm to give ordinary images an effect like this: http://justinlivi.net/wp-content/uploads/2011/01/Living_In_Digital.jpg My idea ...
0
votes
1answer
120 views

JSP in Javascript file or multiple AJAX requests

I've been thinking about how I want to load my data for some checkboxes in an AngularJS app. I'm generating multiple checkboxes based on 2 JSON objects that are currenty hard-coded in the a Javascript ...
0
votes
3answers
153 views

What is the best way to go about storing application options: file system or db? [closed]

We are looking to find the best way to store user options (skills, degrees, industries, languages, etc.) for drop downs. The options are between a JSON file we can store on the server file system or ...
2
votes
1answer
42 views

Best-matching comparative values using all items in array

I have two arrays of objects (items) in the exact same format. Each item represents a wager, and each array represents one of two outcomes for that wager (ex: Team A vs Team B). Both arrays look ...
4
votes
1answer
78 views

Status Bar Timetracking Design

I'm currently developing an application in ASP.NET using SQL as the backend database. In my header, I have a status bar that displays the current status of the user and a timer that shows how long ...
0
votes
1answer
50 views

Looking for a way to interpolate a base URL that won't conflict with Underscore template code

At my workplace, we have dev and production environments, and a separate server that serves static files for each environment. In my code, I make references to the URL of this static file server. ...
0
votes
2answers
265 views

how do websites detect my screen resolution

http://whatsmyuseragent.com/ tells you your screen resolution, javascript enabled,user agent and local time etc? User agent is a part of HTTP header. How do they know about other information? I ...
0
votes
1answer
146 views

Do I need Bower for front end dependencies when I am already using composer?

I use composer for PHP dependencies. I was under the impression that for front end dependencies I should use Bower. So, I installed Bower and loaded my FE dependencies (Bootstrap, jQuery) using that. ...
2
votes
1answer
63 views

Reuse already fetched data for request

I have action that fetches user model from db to check access. Then I have method that in some cases requires same model. function checkAccess(req, res, next) { var data = ...
88
votes
2answers
6k views

What is JavaScript, really?

All this started when I was looking for a way to test my webpage for JavaScript conformance like the W3C HTML Validator. I have not found one yet. So let me know if you know of any... I looked for ...
0
votes
0answers
29 views

Any point in using ES6 Map when keys are all strings?

Plain object keys must be strings, whereas a Map can have keys of any type. But I have little use for this in practice. In nearly all cases, I find myself using strings as keys anyway. And presumably ...
-1
votes
1answer
84 views

Dictionary representation of an object

As python memory model is dictionaries of dictionaries, looks like any object in JavaScript has similar representation. Below code, > foo = {} makes foo as an empty dictionary {}. fine. If ...
11
votes
3answers
713 views

Unit Testing Competition

My employers runs a monthly unit testing day competition. One entire day is dedicated to writing unit tests -- obviously we do more testing throughout the month, but this is an entire day -- and the ...
0
votes
0answers
72 views

Why would I need node.js to run a javascript library?

I'm interested in using sigma.js, and I'm looking at the instructions here: https://github.com/jacomyal/sigma.js/wiki One of the prerequisites is that node.js is installed. If it's a client side ...
0
votes
1answer
85 views

What pattern to use when you have to hide/show different sections on a form depending on a dropdown value?

For example, let's say you have 8 sections to hide/show and depending on the value of a dropdown, you have to show or hide dynamically from 1 to 8 sections. 1) Is there any better way of doing this ...