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
votes
0answers
27 views

Conceptual differences: reactjs vs dustjs [on hold]

So I recently started working on a project that requires client side templating for faster response time as well as server side rendering for faster first load as well as SEO optimization. In this ...
0
votes
0answers
16 views

AngularJS app performance slowing down [on hold]

I am fairly new to AngularJS but quite interested in using it for a production application. I wanted to use http://kelp404.github.io/angular-form-builder/ as a baseline for my project, but it seems ...
-1
votes
0answers
32 views

Is AngularJs the right choice for Scalable Applications? [on hold]

I have been researching for weeks now on the right architecture for creating a web page/ form builder solution ( something similar to www.formassembly.com/service-overview.php) and after looking at ...
0
votes
1answer
81 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
140 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
155 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, ...
-2
votes
0answers
57 views

What are three contrasting examples of DIP and OCP in Javascript? [on hold]

What are three contrasting examples of DIP & OCP in Javascript? As a web developer, I'm struggling to fully grasp the Dependency Inversion Principle & the Open/Closed Principle as it applies ...
-3
votes
0answers
42 views

How to design graph in ASP.NET with C# [on hold]

Hello to all my friends. I have to build such an application where I can draw this type of landscape drawing showing plots. I have to use C# and ASP.net. Now I have planned to do the job like this ...
2
votes
2answers
319 views

How can I refactor client side functionality to create a product line-like generic design?

Assume the following situation similar to that of Stack Overflow: I have a system with a front-end that can perform various manipulations on the data (by sending messages to REST back-end): Posting ...
-5
votes
0answers
25 views

Should the frontend JavaScript code of a large web application be implemented using an Object-Oriented approach? [on hold]

It seems to me that the answer should be yes because then you can apply good principles such as design patterns. I was involved in building a large single-page app and the approach was procedural. I ...
2
votes
1answer
70 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
1answer
145 views

With AMD style modules in JavaScript is there any benefit to namespaces?

Coming from C++ originally and seeing lots of Java programmers doing the same we brought namespaces to JavaScript. See Google's closure library as an example where they have a main namespace, goog and ...
-4
votes
0answers
34 views

Wondering why button is not executing code [closed]

I made a submit panel in the nav to submit files to a website I am currently working on. Dopeyemine.com For some reason the "Submit" button in the submit panel is not working. Please review the ...
1
vote
0answers
115 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
votes
1answer
68 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 ...
0
votes
1answer
96 views

Difference between lexical scoping and passing variables in JS

There are several ways to reach the same end point in JS, for example: (function (foo, bar) { return {run: function () {return foo(bar);}}; } (foo, bar)); (function (foo, bar) { return ...
-2
votes
1answer
82 views

Difficult AngularJS Routing Question [closed]

For my work, I have been asked to find a way to route custom URLs in AngularJS using $route. Its more complicated though because we need to build a URL which conditionally loads up an ngView based on ...
-1
votes
0answers
30 views

Easy Web interface development framework [closed]

So, I'm actually a DBA but a formerly Java/Python/Powerbuilder/C programmer. In the past I joined a team as developer for a large government website written in Java + Struts 1.3 + Hibernate + Sencha ...
2
votes
1answer
124 views

Sub routing in a SPA site

I have a SPA site that I'm working on, I have a requirement that you can have subroutes for a page view model. Im currently using this 'pattern' for the site MyApp.FooViewModel = MyApp.define({ ...
1
vote
1answer
57 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 ...
1
vote
2answers
264 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 ...
-3
votes
0answers
45 views

What should PHP programmer use for smartphone development? [closed]

I like to create web applications, but I want to be able to create some simple smartphone apps (GPS, camera, filesystem, notifications, network access, ... ). I'm thinking about Titanium SDK, but ...
1
vote
4answers
659 views

Why do C# developers newline opening brackets? [closed]

I've spent most of the last several years working mainly with C# and SQL. Every programmer I've worked with over that time was in the habit of placing the opening brace of a function or control flow ...
0
votes
1answer
134 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
1answer
112 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
2answers
39 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
1answer
30 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 ...
11
votes
5answers
967 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
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 ...
6
votes
3answers
2k views

Responsive Web Design vs. User-Agent Sniffing

The CSS3 media query feature has led to many interesting possibilities in terms of developing websites which adjust to many different screen sizes and devices. However, in practice, I'm starting to ...
1
vote
2answers
158 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
4answers
258 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 ...
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 ...
10
votes
5answers
526 views

Compute if a function is pure

As per Wikipedia: In computer programming, a function may be described as pure if both these statements about the function hold: The function always evaluates the same result value given the ...
0
votes
1answer
64 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 ...
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... ...
0
votes
2answers
150 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
3answers
396 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
124 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
4answers
392 views

Multiple attribution in Python, JS, …?

I accidentally discovered this a=b=c=d=e=f=2 in python(2.7)(and JavaScript a few minutes later) interpreter . Is this a feature or just the way the interpreter works, if is a feature how it is ...
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 ...
2
votes
3answers
247 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;?
-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; ...
0
votes
1answer
50 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
116 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 ...
1
vote
4answers
442 views

Pure Front end JavaScript with Web API versus MVC views with ajax

This was more a discussion for what peoples thoughts are these days on how to split a web application. I am used to creating an MVC application with all its views and controllers. I would normally ...
29
votes
2answers
7k 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 ...