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
1answer
38 views

Please help, I'm trying to open a dialog box using ajax inside kendoGrid row double click but I've encountered error [on hold]

Here's the complete javascript: <script type="text/javascript"> var gridReadUrl = '@Url.Action("LoadServices")'; var getServiceUrl = '@Url.Action("GetAService")'; var GridExample = function ...
2
votes
3answers
205 views

Will object reuse optimize this often-called function?

Suppose I have a function that I need to call a lot, maybe a few thousand times on every mouse down or mouse move. It uses an instance of a function (class), called Transform: function func1(a, b, c) ...
4
votes
3answers
169 views

Client Side Coding: How to prevent malicious use?

Over the last few years, the trend for client side (browser) apps has really taken off. For my latest project, I have decide to try and move with the times and write a client side app. Part of this ...
4
votes
4answers
250 views

How to write JavaScript while keeping HTML/CSS out of it

What is / are some recommended ways to write JavaScript as to control behavior of showing HTML on screen, while keeping well-maintainable code? Basically, I started to look for ways to keep HTML/CSS ...
0
votes
1answer
126 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
0answers
11 views

Need help with simple angularjs programming [migrated]

I am trying to do simple programming in angularjs. I have created two buttons. The first button has text "clickHere", and the second has no text. My task is when I click the button that has text, it ...
2
votes
1answer
217 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, ...
36
votes
2answers
19k views

When not to use Google Web Toolkit? [closed]

I'm considering use of GWT on a major in-house web app development project, namely it's major advantage in my eyes is the cross-compilation to Javascript which would (at least theoretically) help my ...
0
votes
0answers
29 views

JavaScript Compression and Caching of Assets

I'm working on an idea that i can't seem to find a good answer though hours and hours of searching, I'm planning a small Canvas/WebGL Application this application will be using WebSockets to talk to ...
33
votes
6answers
26k views

Advantages of using pure JavaScript over JQuery

What are the advantages of using Javascript-only versus using JQuery-only? I have limited experience with JavaScript and JQuery coding. I've added bits and snippets of each to HTML pages but I've ...
2
votes
3answers
349 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 ...
26
votes
6answers
2k views

Tight Coupling Between Javascript, HTML, and CSS: A More Modern Approach?

It's very common to see Javascript bound to certain selectors to find elements, store data, and listen for events. It's also common to see these same selectors used for styling. jQuery (and its ...
1
vote
2answers
286 views

What is the recommended approach for helper functions in JavaScript?

What is the recommended approach for helper functions? I would like to choose one technique, and run with it to create my new "class". Here are the design options I have pondered: Option 1: Helper ...
1
vote
0answers
92 views

Reducing code complexity for an interface between angular and d3

I'm playing around with different ways of integrating d3 and angular, in the context of learning both of these frameworks, and am hoping for some input: My client application receives a JSON array ...
6
votes
2answers
220 views

Javascript MVC application design (canvas)

I'm having difficulty grasping how to structure/architect a canvas application using an MVC like approach in Javascript. UI will be fairly fluid and animated, the games fairly simplistic but with ...
1
vote
1answer
110 views

Object Chain through an Interface

Say I have 3+ types of objects: function Sea() { var logs = [Logs]; this.getLog = function(ind){return logs[ind]} } function Log() { var bumps = [Bumps]; this.getBump = ...
2
votes
0answers
67 views

JavaScript Combination Inheritance Pattern

In the chapter of Professional JavaScript for Web Developers on OOP, Nicholas Zachas describes a JavaScript inheritance pattern which he refers to as combination inheritance. The basic idea is that ...
9
votes
6answers
1k views

Why the most famous sites on the web are not all truly Single Page Applications? [closed]

I'm currently building a single-page-application using AngularJs. While I'm happy with this way of doing, I've noticed that huge and famous sites, like popular social networks for instance, always ...
0
votes
0answers
37 views

Token based autorization for a web game

I am lead developer for a multiplayer game in a small startup company. I would like to present here my solution for token based authentication and hear your opinions about possible weak spots. I am ...
2
votes
2answers
138 views

How to develop cross platform mobile applications with native UI and Javascript backend?

I want to build a cross platform(Android, iOS, Windows) mobile application. I want the UX of the application to be different on the different platforms so that it will be more platform specific and ...
7
votes
3answers
1k views

Are there open-source JavaScript libraries addressing multiple browser tabs and client state for newer browsers?

There are a few new HTML5 features that have made it into recent browsers that allow sharing state among tabs, browser windows, same domain windows, etc. So it's probably gotten a little easier to ...
0
votes
0answers
28 views

Populating Google Maps with Markers from C# List [migrated]

I am trying to populate a javascript google map with a c# list of google map markers. I can get data in from public floats but not from the list. The list will be populated by the database but in this ...
8
votes
1answer
474 views

I know JavaScript really well, but i bomb coding interviews [on hold]

So I'm currently on a hunt for a new position as a Front-End Developer. I know JavaScript very well and can wax poetically about Closures, Currying, Prototypal Inheritance, Design Patterns, App ...
3
votes
6answers
648 views

I need a JavaScript runtime environment [closed]

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 ...
0
votes
1answer
134 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
143 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({ ...
0
votes
2answers
187 views

Whats the best way to build a HTML/AJAX site that requires login? [closed]

Let's say that hypothetically you wanted to build a website that delivered content to the visitors entirely using HTML and Javascript (AJAX to fetch server side data). The site would require login for ...
1
vote
1answer
93 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
0answers
70 views

Is Microsoft certification needed for a Web Developer? [closed]

I'm a web developer with 2 years of Experience. I want to know if Microsoft Web certification matters for me for a better future & money perspective also. Or should I go with technical knowledge ...
0
votes
0answers
22 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
159 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
17 views

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

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
54 views

Malicious Code Mitigation/Discussion [closed]

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
55 views

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

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
90 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
176 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
127 views

Best practices / reasons for String constants in JavaScript [closed]

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
168 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
60 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
188 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
83 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 ...
8
votes
2answers
379 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
3answers
218 views

Simple straight-line path algorithm [closed]

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
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
103 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 ...