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

0
votes
0answers
8 views

JavaScript: testing with undefined value

While learning more about IE’s documentMode property, I came across some sniffing code, which, of cause, fails in browsers like Firefox. However, a simplified version of the test would readas such: ...
0
votes
0answers
30 views

Javascript and SQL Lite (multi browser offline SQL/database query)

I'm in the elections division of my county and am trying to simplify a voter lookup method for our poll judges during election time. Currently we are using a clunky heavy application that the judges ...
0
votes
0answers
67 views

Why is Javascript the only language for front-end web development? [on hold]

Say you want to write a desktop application. You can choose from any of the top 20 languages on the TIOBE index and find a toolchain for that language for your platform (there are a few exceptions, ...
0
votes
1answer
27 views

Creating a voting platform for submissions during timeperiod

I have a site where stories are submitted at any time by users. The staff would like the ability to create a voting period at any time. For example, they can choose to open up voting from today until ...
-3
votes
0answers
43 views

What are Java, HTML, and Javascript technologies for producing basic reports with Excel export? [on hold]

We have several reports that are very basic in nature. Some reports accept up to 3 parameters. All reports generate a table with the result set. No pie charts, line graphs, etc. The reports can be ...
1
vote
1answer
38 views

Does ES6 help grow the Ecmascript standard library?

With all the noise about EC6, one thing that I realized I haven't heard about is expanding Javascript's standard library. Javascript has a fairly sparse standard library. You need a 3rd party library ...
-3
votes
0answers
36 views

Bluetooth 4 communication function and programming languages [on hold]

I have a Bluetooth 4 controller that works with an iOS app fine. What I am attempting to do is create a JavaScript that will replace the iOS app in function. For example, go to a browser, load a ...
0
votes
2answers
124 views

Is it a good idea for JS objects to draw themselves when the page loads?

So normally I would only use JS to modify the dom after the user interacts with something or some event goes off. This seems right for some reason. But I'm developing a widget based app where widgets ...
2
votes
2answers
93 views

What's a good way to make sure that locally serialized data can be deserialized in newer code?

Context: I'm working on an HTML 5 game without persisted state. Every time you refresh the page, you start at the beginning. People are requesting that they can start where they left off if they ...
-4
votes
0answers
30 views

Payment processors that work with Angular or other JS fameworks? [on hold]

We are trying to figure out a way to send credit card data to a payment processor without being PCI compliant ourselves. Our application is a Single Page Web Application (SPA) based on AngularJS and ...
2
votes
1answer
146 views

Will this “wireless” syntax for my framework make for good code structure / design?

I'm at the point where I'm getting into the freelance development of some complex web apps, and I would like to develop a light weight framework for my personal use, but I'd like to get some advice ...
-2
votes
0answers
42 views

Vectorization (Image tracing) in Javascript? [on hold]

Is it possible to convert an image from Bitmap (Raster) to Vector using Javascript? If not, what would be a good web based solution for the conversion, preferably some client side scripts? Thanks
-1
votes
0answers
72 views

Automatically expose large software library using web services? [closed]

(Edited from initial post) Lets say I want to automatically generate web-service wrappers for some large arbitrary source code library (it doesn't matter which language). The aim is touch-free ...
1
vote
1answer
87 views

what does it mean when a nested function isn't assigned to a var?

I'm referencing this link about closures: http://stackoverflow.com/questions/111102/how-do-javascript-closures-work This is specifically about javascript. In the second answer with 956 votes, The ...
-2
votes
0answers
24 views

Product Database for Specialty Foods [closed]

I work for a specialty foods retail establishment and wish to create a database for employees to reference product information. Is it feasible to create such a database with JavaScript and SQL? I'm ...
-1
votes
0answers
25 views

HTML Canvas: Is there a Javascript vector library that is equivalent to Processing PVector? Or a Canvas library that has a built in vector class? [closed]

Not sure if this is the right forum this question. But my same question in Stackoverflow has been downvoted. Anyway, I am looking at doing some canvas particle system. Still very new in this. It ...
0
votes
0answers
47 views

Building SQL from multiple combinations of query parameters [migrated]

I have a node.js/express.js based REST application. In one GET service I am querying data based on different set of request parameters. I am looking for a better way to implement it. Following is my ...
0
votes
1answer
102 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 ...
0
votes
2answers
153 views

Working with Javascript classes the right way

Comparable questions have surely been asked before but I'd like to hear some words about my specific way of implementing Javascript classes. Let me first start with a Javascript example taken from a ...
-1
votes
1answer
72 views

What's the node.js package that helps hook into dlls? [closed]

I recently came by a website that's about a node package that can do live inspection of running programs (under windows). It injects the chrome v8 into the executable which gives us the ability to use ...
1
vote
0answers
154 views

Efficient development process for Golang (or any backend) and JavaScript?

I am developing a web application. The frontend is a mix between JavaScript and server-side generated html. The backend is written in Golang. Might not be very important, but if somebody made a ...
1
vote
2answers
269 views

is JS a gradually typed language?

I was researching on statically typed and dynamically typed concepts and found out there is another type system called gradually typed. From wikipedia Gradual typing is a type system in which ...
1
vote
1answer
66 views

Web Application: Combining View Layer Between PHP and Javascript-AJAX

I'm developing web application using PHP with CodeIgniter MVC framework with a huge real time client-side functionality needs. This is my first time to build large scale of client-side app. So I ...
-3
votes
1answer
116 views

Would you get better performances by coding an application in C, then compile to JavaScript? [closed]

I am writing an interpreter for a functional programming language that is going to run in the browser. Needless to say, performance is the one and only concern in this application. Emscripten is an ...
0
votes
1answer
32 views

best practice to inter widget communication in javascript

I have quit a lot of javascript widget and I would like to have a good decoupled way to communicate between them. Something like signals and slots in QT probably? Most of my widgets are written in ...
0
votes
2answers
41 views

Live search/filter as you type in client approach

As an exercise for myself to practive my JavaScript "skills" I'm trying to write (let's reinvent) a client-side filter. It should be able to filter "content blocks" as the client types. Wit a ...
0
votes
0answers
6 views

Bootstrap Active tab on modal hidden [migrated]

I am using Bootstrap as Framework for designing a form, the form has fields in several tabs, I added a onSubmit event that displays a modal if there are any empty field cancels the submit and focuses ...
11
votes
5answers
975 views

Is it beneficial to study past the basics of a core language when the primary goal is to rely on its framework? [closed]

Please keep in mind this is not another 'How much [insert programming language here] should I know before moving onto [insert framework here]?' What I'd like to know is how beneficial is it to learn ...
0
votes
0answers
4 views

js syntax errors in text adventure [migrated]

hi i'm new to java script and I wrote a text adventure for a school project and I keep getting these error when I try to run it js: "adventure.js", line 4: missing ( before condition js: if var ...
1
vote
0answers
30 views

How do I differentiate between old and new data in backbone collections?

A common pattern I come across is a backbone collection which is initially seeded from a database. However, the user can also add to the collection. When the user does add to the collection, these ...
0
votes
0answers
4 views

Change window title of Firefox browser after page has been completely loaded [migrated]

I am working on a project where i want to change the title of firefox window when it completes the page loading. For example i give URL www.google.com , now when this website is loaded i want to ...
1
vote
2answers
162 views

How do I find the JavaScript that is invoked when I click on a button or a link in a web-page (part of a data mining project)?

I tried to use the 'inspect element' of the firebug addon for Firefox but it doesn't give me any link to the javascript. For example I got this from the firebug add-on: <a href="javascript:"> ...
0
votes
1answer
70 views

MVC data binding

I'm using MVC but I've read that MVVM is sort of about data binding and having pure markup in your views that data bind back to the backend via the data-* attributes. I've looked at knockout but it ...
0
votes
4answers
262 views

What if(event) statement means in JavaScript? [closed]

I'm rather new to JavaScript and programming in general so I am pretty much only used to seeing if statements that have some kind of comparison operator like, if (x < 10) or if(myBool). I have ...
1
vote
0answers
36 views

Range searching with WebGL

Is it possible to use somehow WebGL to fasten up 1d range searching? I need to find overlapping date intervals, and I thought that 3d games usually have a very similar problem by rendering frames... ...
2
votes
1answer
76 views

Caching large amount of ajax returned objects

I'm building an application which fetches large amount of items with ajax requests via other application API. It returns me 6k - 30k js objects which are used multiple times across various application ...
0
votes
2answers
151 views

Javascript Rookie Question: Define Variables Inline

I'm proficient with HTML and CSS but I'm still pretty shaky when it comes to Javascript. That said, I've been able to build a site using the Internet Archive Book Reader, which relies on reader.js ...
0
votes
0answers
6 views

js: input file to json with for example JSON.stringify [migrated]

I want to convert a html input file to a json string like this: var jsonString = JSON.stringify(file); console.log( file ); console.log( jsonString ); Now, in my firebug: File { size=360195, ...
0
votes
0answers
51 views

Javascript Module pattern with DOM ready [migrated]

I am writing a JS Module pattern to test out code and help me understand the pattern, using a JS Fiddle. What I can't figure out is why my "private methods" on line 25 and 26, when referenced via DOM ...
-4
votes
0answers
31 views

How to make the code shorter with keeping loop? [migrated]

How to make the code shorter with keeping loop? var age = prompt("What is your age"); for (var i=18; i<=age ; i++){ alert ("Welcome"); break } for (var i=18; ...
2
votes
3answers
249 views

Is it necessary to start variable from zero (var i = 0 ) of ' for loop '? [duplicate]

Is it necessary to start variable from zero (var i = 0) of any looping ? When should I use var i = 1; and when var i =0;?
0
votes
1answer
51 views

Javascript: Machine Constants Applicable?

I write numerical routines for students of science and engineering (although they are freely available for use by anybody else as well) and am wondering how to properly use machine constants in a ...
0
votes
1answer
117 views

How to handle mutiple API calls using javascript/jquery

I need to build a service that will call multiple API's at the same time and then output the results on the page (Think of how a price comparison site works for example). The idea being that as each ...
0
votes
1answer
136 views

Website File and Folder Structure

I am having a problem learning how proper website structure should be. And by that I mean how to code the pages and how folder structure should be. Currently I am navigating around my website using ...
-3
votes
1answer
78 views

How to make a non-english clone of CoffeeScript? [closed]

I want to make a non-english programming language that is identical to what CoffeeScript is to JavaScript. What I mean is that I don't want to build my own design or syntax. Just want to have a ...
2
votes
0answers
45 views

Managing setTimeouts and setInterval in a distributed environment

I am building a turnbased game on nodejs using socket.io and redis as the datastore. I am planning on hosting the game on AWS opsworks with the ability to scale by adding more nodes. How should I ...
0
votes
2answers
105 views

Image caching when rendering the same images on different pages [closed]

I'm told to think about caching of images that will be displayed on the page. The images will be repeated throughout the website on different pages and I'm told to figure out the best way to cache ...
0
votes
1answer
105 views

Jasmine BDD vs Integration Tests

Let's say I need to write a test for the front end, in the following BDD style: A user visits buysomething.com, saves something to their wishlist, and a saved item count is updated. The result ...
7
votes
5answers
293 views

Algorithm for flattening overlapping ranges

I am looking for a nice way of flattening (splitting) a list of potentially-overlapping numeric ranges. The problem is very similar to that of this question: Fastest way to split overlapping date ...
0
votes
1answer
78 views

Which approach would lead to an API that is easier to use?

I'm writing a JavaScript API and for a particular case, I'm wondering which approach is the sexiest. Let's take an example: writing a VideoPlayer, I add a getCurrentTime method which gives the elapsed ...