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.
0
votes
1answer
112 views
Converting a user management system to use ajax
I am currently building a website, which until quite recently was purely PHP. However I am now making trying to have the site use more AJAX, to lessen the page reloads. In PHP I had a lovely object ...
0
votes
2answers
39 views
What tools can I use to create static demonstration documentation? [closed]
As we embark on a project of javascript UI widgets, we need to create demonstration documentation on these widgets.
However, we can't create said documentation using a CMS. These should be static ...
1
vote
1answer
34 views
Best resource for developing JavaScript curriculum? [closed]
At the risk of being downvoted, I really need the community's input - I am helping put together a post-secondary quality curriculum (vocational school, not university) around open-source languages, ...
3
votes
2answers
86 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 ...
25
votes
9answers
7k views
Why do people disable JavaScript?
I asked a question yesterday Should I Bother to Develop For JavaScript Disabled?. I think the consencus is: Yes, I should develop for JavaScript Disabled. Now I just want to understand why users ...
1
vote
1answer
106 views
Checklist for coding MVVM web application [duplicate]
We are a small team working on a web application using MVVM design pattern using technologies like .NET, Knockout and HTML. I am trying to come up with a code review checklist for this, so that my ...
8
votes
2answers
382 views
Functional reactive programming — is Fay expressive enough?
So I'm doing a fairly involved javascript/html client with lots of ajax calls and other involvements of callback-ism. I'm entertaining the thought of using Fay for this purpose. I'm aware of Elm. ...
3
votes
1answer
72 views
Building a Graph Editor - How to create a data driven graph
I am developing a graph-editor that uses drag and drop to build hierarchical graphs (containing nodes and links). Each node in the graph should be linked to a table in our database (SQL Server). I did ...
7
votes
4answers
3k views
try-catch in javascript… isn't it a good practice?
There is a provision for try-catch block in javascript. While in java or any other language it is mandatory to have error handling, I don't see anybody using them in javascript for greater extent. ...
2
votes
3answers
194 views
Anonymous function performance - setTimeout
According to Gregory Baker & Erik Arvidsson (Google), creating a named function and then passing that to setTimeout is actually faster than creating an anonymous function (reference: Optimizing ...
0
votes
0answers
33 views
document directory path in javascript file in iOS
I am working on a project using MetaIO SDK (AREL).
It works fine with all the files in the package (ipa),
but I'm trying to download an animation automatically using a web service.
It will be ...
-4
votes
1answer
191 views
Beginner webdeveloper. How to make development right? [closed]
I work for a company that has developed its own PHP framework. From my perspective, it seems quite hard and tiresome to develop and maintain websites in this framework.
Let me give an example. It is ...
-1
votes
0answers
16 views
why cant you access first div element of body like document.body.div[0] in html/javascript [migrated]
i can do document.body.childNodes[1] but why not this. How does it work for document then.
Sorry if i am missing something.
Following this logic, body should have been only accessible through
...
0
votes
1answer
146 views
JavaScript static methods retrieval
I have been thinking about it and wanted some feedback, recently I thought about doing it like this:
function foo(){
if ( !foo.prototype.statics ){
foo.prototype.statics = {
// ...
2
votes
2answers
383 views
Power of HTML5? [duplicate]
HTML5 is becoming more and more popular everyday. Many great online applications are now being created and described as pure HTML5 apps. (Like Muro)
But I don't understand what is exactly so cool ...
0
votes
1answer
33 views
Base64 decode and SH1 decryption of Sec-WebSocket-Accept value example from Websocket RFC
I am planning to implement the Websocket protocol and currently learning how handshake headers must be structured.
According to this link
http://datatracker.ietf.org/doc/rfc6455/?include_text=1
...
2
votes
1answer
126 views
Approaches to reduce cyclomatic complexity
I was running our code through JSHint, and decided to switch checks against cyclomatic complexity, and then went on long refactoring sprint. One place though baffled me, here is a code snippet:
var ...
1
vote
2answers
120 views
Creating a text input simplifaction tool
I have been working on a project for several months now to write a web-based tool that will help me at work. I work at a call center and the CRM software that is used is wretched, we basically have to ...
0
votes
2answers
739 views
Javascript storing data [closed]
Hi I am a beginner web developer and am trying to build the interface of a simple e-commerce site as a personal project.The site has multiple pages with checkboxes. When someone checks an element, it ...
7
votes
3answers
356 views
is this javascript property defaulting pattern a code smell?
In some javascript code I'm working on refactoring I've handled cases where I wanted to default an object property to true without having to go through the code-base and add the property to every ...
-3
votes
0answers
72 views
Is it Wise to disconnect the ui layer from the backend in mobile web apps? [closed]
What's the future when it comes to mobile web development?
I mean, traditionally, in the java world, we make use of Java EE technologies such as Spring, Hibernate and some MVC framework like Spring ...
0
votes
1answer
50 views
Evaluating JSON from popular auto-suggests
I was evaluating the various ways in which the big guys implement auto suggest. These are my observations.(Search string used was "ab") Questions towards the end.
Yahoo tries something like this, ...
4
votes
2answers
111 views
How to modularize and package a client-side Javascript library today?
I've been catching up with the modern client-side JS ecosystem and reading up on CommonJS and AMD (incl. associated tools - browserify, requirejs, onejs, jam, dozens of others). If I'm writing a ...
2
votes
1answer
82 views
Client side authentication through signatures instead of passwords
I want to save some user-generated data with some signature of the user that generated it (let's say that the user has to fill some forms with some data and I want him to sign the written data).
The ...
1
vote
0answers
106 views
Which lower-level language is most similar to javascript? [closed]
When I say lower-level language, I'm talking about something that compiles to machine code as opposed to being interpreted or compiling to CIL/etc. Is there a lower-level language that bears ...
1
vote
2answers
71 views
Javascript and web application data
I am pretty new to Web Application programming and so to OOP Javascript and the new Client-Server interactions.
I am encountering some trouble wondering about how much AJAX I should use or how much ...
8
votes
1answer
163 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 ...
10
votes
3answers
290 views
Object Oriented Programming in JavaScript. Is there life without it? [duplicate]
At our company we have pretty large body of PrototypeJS based JavaScript code, which we are porting to jQuery for several reasons (not really important here). I'm trying to set up coding guidelines to ...
-3
votes
0answers
44 views
Need suggestions for web page with blueprint-based room content display for a college campus [closed]
StackOverflow! Rather than an specific error or issue, I am actually looking to draw on your collective knowledge for suggestions for a solution I need to implement for our campus IT website.
I have ...
2
votes
1answer
432 views
What's the best way to use requestAnimationFrame and fixed frame rates
I recently got into using the HTML5-requestAnimationFrame-API a lot on animation-heavy websites, especially after seeing the Jank Busters talk. This seems to work pretty well and really improve ...
1
vote
1answer
180 views
How much inconsistency arises from Javascript's high flexibility?
I'll admit it, I haven't yet mastered the language, but my experience with it tells me that Javascript is a highly flexible language, allowing prototypal inheritance, dynamic typing, functions as ...
0
votes
0answers
48 views
Document existing Visual Studio Project [duplicate]
I am a small business owner and my sole developer quit. Cold. I am not a coder. He developed an existing application that works .net, c#, javascript, sql, visual studio based, 250,000 lines of code. ...
1
vote
2answers
163 views
Single codebase for client and server with Node.js [closed]
There are a few claimed benefits to Node.js that I typically hear. Some (many?) I agree with. There is one that I completely do not understand, which is the one language argument: "You can now use one ...
2
votes
1answer
53 views
Websocket protocol server development
I am interested in building a custom Websocket server for college project. I have a good familiarity about HTTP 1.1 and knows quite well of how it works. I am asking this question assuming that ...
-1
votes
2answers
225 views
How to run C++ code in browser using asm.js?
An asm.js application is very fast (near native C++ speed): http://kripken.github.io/mloc_emscripten_talk/micro4b.png
But how is it possible to write one in C++, convert it to LLVM code, then do some ...
0
votes
0answers
71 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 ...
17
votes
6answers
1k views
Why the recent shift to removing/omitting semicolons from Javascript?
It seems to be fashionable recently to omit semicolons from Javascript. There was a blog post a few years ago emphasising that in Javascript, semicolons are optional and the gist of the post seemed to ...
2
votes
1answer
467 views
Is there any “Programming Challenges” site that we can submit in Nodejs? [closed]
Looking for a site for solving some Programming Challenges, like SPOJ, that i can submit in NodeJS.
In SPOJ we can submit in Rhino, but not in Node.
I know it's not that different, but i was looking ...
-1
votes
1answer
40 views
client side code set up and why use apache web server [closed]
Trying to get a better understanding of the current project set up and want to know if there is an easier set up.
The project is set up a 2 different components, one project contains the client side ...
4
votes
12answers
1k views
Feeling well out of my depth [closed]
I have just started a new job as a front end web developer, this is my second day and I have just been handed quite a big project that involves lots of javascript which I dont know, this is leaving me ...
0
votes
1answer
99 views
Pros and cons of the following Parsing methods?
I'm thinking of making a Python-JavaScript converter/compile. I've been wondering about the pros and cons of the following methods to parse the Pythonic code, into JavaScript equivalent.
Working ...
-2
votes
1answer
41 views
Make script that allow server and client to communicate [closed]
I have apache installed, and I would like (using php/and or javascript, html) to do the following but I do not know how.
To send my client to the server a value x
The server to increase x by one ...
4
votes
2answers
168 views
Why would I use Angular?
From the basic Angular tutorial, it seems like all it does is fetch some JSON from an API and display it. Also, there's its double binding magic.
But why would I use it instead of a backend solution ...
1
vote
1answer
98 views
Finding the possible combinations of x switches out of y being true
I am working on an algorithm to find possible fills for gaps in text. My function will receive as input:
(example)
[false,"o",false,"b",false,"r"]
representing the string "foobar" with some values ...
2
votes
5answers
343 views
What is the best way to load balance javascript applications?
I write a lot of javascript applications and in many different circumstances the browser will become unresponsive or give a "slow script" error. Even when following best practices, initializing large ...
1
vote
1answer
133 views
“Generators are function derivatives”
I am reading this article on a new feature of ECMAscript 6, generators, that are landing in the V8 JavaScript interpreter. Not too far from the top, the author suggests an analogy:
generators are ...
2
votes
1answer
127 views
HG: fork web app project to separate API code from app code
I have a web app thats been in active development for about 8 months now and its becoming apparent that the project has a need to maintain a separation between app specific code and our OO Javascript ...
9
votes
4answers
2k views
Are UML class diagrams adequate to design javascript systems?
Given that UML is oriented towards a more classic approach to object orientation, is it still usable in a reliable way to design javascript systems?
One specific problem that I can see is that class ...
2
votes
1answer
139 views
How to dynamically add new posts once they are created
I am trying to design an application where users can make posts with Django on the backend. Right now I have to refresh the page with JavaScript every 20 or 30 seconds to check for new posts that ...
-4
votes
1answer
79 views
Making <li class=“”> active and inactive [closed]
I have a simple html page in which i'm including header.php, footer.php files.
In this page there is a sidebar which is styled by css. I want to take this sidebar out and include it through php ...


