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

-3
votes
0answers
15 views

How to auto open pdf file in windows/mac in adobe reader using javascript? [on hold]

How can I auto open a file in Windows or OS X Adobe Reader after downloading it using javascript or JQuery.
0
votes
0answers
7 views

What's the Content-Security-Policy-friendly way to hand data from the server to the browser on page load?

When developing for the web, I often find myself wanting to pass a few variables from the server scripts to my javascript - data pulled from a database, and set differently on different pages running ...
1
vote
2answers
70 views

Why a hashtable? Why not just a non-hashed associative array?

I've been learning about using a hashtable to efficiently check for items in a list without looping through the whole thing, but there's one thing that I don't get: Why hashed keys? It seems like: ...
0
votes
0answers
8 views

How do I get data from the Bitfinex web API using javascript

Here is a link to their API documentation I would like to practice web programming by creating a bitcoin price ticker from scratch. My plan is to serve a script that makes api calls to exchanges to ...
0
votes
0answers
44 views

Malicious Code Mitigation/Discussion [on hold]

A couple days ago, while reading the news on various current events from several different news websites, a window popped up and filled my screen. It was one of those malicious websites that ...
0
votes
0answers
17 views

ajax request not being called from javascript function in django [migrated]

This is a full flow which has to be taken care here. I am coding in Django/Python/Web Development. I have an html page which has got a dummy button which is triggering all the functions that I want ...
0
votes
0answers
45 views

Do I need to do something special to run ECMAScript 6 (JS 2.0) in Chrome? [on hold]

I noticed someone suggesting a ECMAScript6 solution, utilizing the Set object on Code Review, and I can't figure out how to try that out. Even though the latest version of Chrome supposedly supports ...
1
vote
2answers
82 views

Should I group all of my .js files into one large bundle?

One of the difficulties I'm running into with my current project is that the previous developer spaghetti'd the javascript code in lots of different files. We have modal dialogs that are reused in ...
0
votes
3answers
167 views

How should I include jQuery in a library?

I'm writing a JavaScript graphing library using canvas which I am licensing under MIT, and I'm using jQuery, as well as a couple of other open sourced libraries, all under MIT. I'm also using bower to ...
2
votes
2answers
104 views

Best practices / reasons for String constants in JavaScript [on hold]

In static languages like Java/C#, I commonly make use of constants for strings or numbers, rather than insert them into the code alone. However, I tend to avoid this practice in JavaScript. More ...
0
votes
1answer
166 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 ...
0
votes
2answers
55 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
13 views

Online Shopping password keylogger risk [migrated]

Suppose I do an online shopping they are asking me to enter my card details like four digit number(whatever related to that) and they are asking me to enter the PIN number too. If I enter all this ...
3
votes
2answers
181 views

Minimizability or readability?

I am authoring a lot of plugins for the content management system that I am writing. I believe it to be of utmost importance that script files (especially if they're plugins) should load quickly, ...
0
votes
1answer
65 views

Javascript function should call python logic in django web development without additional triiger

I have been trying to solve this problem for sometime now. This is regarding django web development. I have an HTML page which has a Javascript function to upload an image file from the users local ...
3
votes
6answers
620 views

I need a JavaScript runtime environment [on hold]

I'm reading books on JavaScript programming, and I need an environment like Python's IDLE to type JavaScript commands into and then see the results like you would in IDLE. Is there an environment ...
8
votes
2answers
378 views

Why is the use of constructors discouraged when creating prototypes?

Quick background: In JavaScript, the constructor function for each object type has a prototype property. The prototype refers to an object that each constructed object uses as the next step up in its ...
0
votes
0answers
50 views

JSON Noob needing help with saving/loading a variable [migrated]

Before you say anything, I am fully aware that there are a lot of questions already asked about JSON. However, from all of these questions, I just can't find an answer that helps me. Onto the ...
0
votes
3answers
215 views

Simple straight-line path algorithm [on hold]

I need a simple pathfinding algorithmn to go from point A to point B. A* seems like an overkill because It doesn't matter wheather I hit walls or not and there's no terrain. I was wondering if there ...
2
votes
3answers
3k views

What is the need of Odata when I have JSON ?

I am trying to understand the point of Odata and when it would make sense. Right now how I work is I use ASP.NET and MVC/WebApi controller to serialize/deserialize objects into JSON and have ...
0
votes
0answers
14 views

cannot display updated data in asp mvc [closed]

I am new to ASP MVC. I have created a visual 2013 MVC project using RAZOR view engine. and here is my repartition: My model class called EmployeeModel: namespace MvcApplication3.Models { public ...
0
votes
0answers
28 views

Need help with Javascript/CSS to manipulate html table layout for bowling scorecard [migrated]

I'm trying to create a responsive table for a bowling scorecard. I want the table to split up depending on the width of the screen, preferably into thirds (where the first row would be frames 1, 2 ...
24
votes
5answers
6k views

Pros and cons of an HTML/JavaScript only web app

I come from an ASP.NET forms background and have found server side coding very powerful in the past. More recently, however, I have been wanting to phase out the server side code of the front-end and ...
3
votes
1answer
2k views

How do I decide what testing framework to use?

The situation is this. I'm a junior developer for a small government IT project. We don't have anything of continuous integration or a automated testing framework. But the idea is to be developing ...
0
votes
4answers
92 views

HTML - Alternative for ID when ID is only unique within a certain scope?

So I feel like this should be a common question but I can't find the answer. Maybe I'm using the wrong terminology. Assumptions: IDs are supposed to be unique across the document. Class attributes ...
1
vote
1answer
230 views

When does a Monad become a hammer?

I realize my precursory understanding on Monads is severely lacking in detail considering my knowledge comes mostly from Douglas Crockford's Monads and Gonads talk and complicated with my sevear ...
-2
votes
0answers
30 views

Is it possible to get code to automate a 3D Cad file from a standard 2D photo that is uploaded? [closed]

We are in the process of developing an idea that requires a photograph that would be uploaded and automatically be vectored and mapped into a detailed 3D CAD image of the head/face only. Can code be ...
0
votes
0answers
38 views

When to use a javascript framework [closed]

We have a ruby on rails website which uses a lot of rail's built in remote ajax with js templates. We have new requirements that are taking us in the direction of a single page application where ...
0
votes
0answers
36 views

Binding in web frameworks - to frontend data or backend data?

AngularJS and other web frameworks provide data binding abilities (as in WPF). Is the UI bound to JavaScript variables on the frontend (web browser) or is it bound to the data in the server (via AJAX ...
0
votes
0answers
375 views

disable print screen key using javascript [migrated]

i try to disable printscreen key in my website. code: <SCRIPT type="text/javascript"> focusInput = function() { document.focus(); }; processKeyEvent = function(eventType, event) { if ...
0
votes
1answer
50 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: ...
46
votes
2answers
11k 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 ...
0
votes
0answers
20 views

Can't post data to php, Can't see why [migrated]

I have some data from a form that is being sent to a php script to send an email, it is from a template but I think it is wrong. I have isolated the part of the code that is to blame. The specific ...
0
votes
0answers
53 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
1answer
28 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 ...
0
votes
3answers
425 views

How to approach multiple page form with just one save option

The screen shot shows the magento product upload page. The left nav allows you to switch to different options for the product. Basically each option in the left nav appears as a different page. ...
0
votes
1answer
156 views

Best practice for storing information from a php script for future use

My employer uses forms to help people search for products. The product lists can change from time to time and the forms need to be updated again. The product information can be accessed through a ...
1
vote
1answer
46 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 ...
0
votes
2answers
130 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 ...
3
votes
2answers
102 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 ...
2
votes
1answer
153 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 ...
0
votes
1answer
93 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 ...
0
votes
1answer
992 views

Looking to create a custom, graphical editor for a data model using HTML5 and SVG

I need to create a graphical editor for our data model that works in an HTML5 compliant browser. I am looking for a proper library/framework to build on. The model is stored as xml, but that should be ...
2
votes
1answer
259 views

Javascript Implementation Patterns for Server-side MVC Websites

I'm looking for information on common patterns for initializing and executing Javascript page by page in a "traditional" server-side MVC website architecture. A few months ago, my development team ...
6
votes
4answers
732 views

Clean, Modular Code vs MV* Frameworks [closed]

I've been hearing a-lot about the "new" MV* frameworks. I've tinkered with KnockoutJS, creating an invoicing application, but I much prefer to write clean, modular code in raw JavaScript - leveraging ...
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 ...
49
votes
2answers
4k views

Are there any OO-principles that are practically applicable for Javascript?

Javascript is a prototype-based object oriented language but can become class-based in a variety of ways, either by: Writing the functions to be used as classes by yourself Use a nifty class system ...
0
votes
1answer
110 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
157 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 ...
2
votes
1answer
194 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, ...