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

How do you publish/share your internal CommonJS/AMD modules?

Question For those of you using CommonJS/AMD modules to build your browser applications, how do you publish/share your modules internally? Do you run an internal NPM (or CommonJS) Repository? If so, ...
0
votes
1answer
35 views

How to make C# methods work like javascript functions?

I'll keep it simple, I want to make C#'s methods work like javascript's functions. Mainly so I can convert this - function makeVariable(terp) { var me = {value: 0}; return function () { ...
0
votes
0answers
25 views

Designing a scripting/programming language - translation - Javascript to C#

So I'm making a small scripting language. I am following a tutorial online, it explains them. Now it has gotten to a part about closures, but I do not know how to do this in C# nor how I would set ...
2
votes
1answer
43 views

equivalence in callback and non-callback javascript

I'm pretty sure that the following two snippets are equivalent but I wanted to double check: CALLBACK STYLE function foo(input, callback) { // do stuff with input callback(); } function ...
-4
votes
0answers
56 views

Ajax File Upload Progress bar [on hold]

I have jqurey for Single file upload code with showing percentage, It's code is I'm recoding the for multiple file upload in the one time. But isn't upload the files. please help for resold the ...
0
votes
0answers
4 views

What is wrong with my jQuery code? [migrated]

I want to toggle a div from left to right when someone clicks on the h1 which is floating on right every thing is working just fine but I can't toggle it. Once the div appears it never goes away. ...
-4
votes
0answers
33 views

Pass array of data from JavaScript to php [on hold]

I develop web application , I use JavaScript to add array of data in table . i want to pass this table to PHP to use it in other methods . How to handle this problem ? help please .
-1
votes
0answers
45 views

How Do I build a Custom Web Browser Using Webkit? [on hold]

This is my first post, so please bear with me. First, though, let me introduce myself: My name is Jessica and I am 30 years old. :-) I want to build a custom Independent webkit based tabbed web ...
-1
votes
0answers
27 views

How do I set 'makehome' in Javascript as an automatic process instead of a voluntary choice? [migrated]

Instead of using makehome() to create a button for users to change their homepage/startpage, how can I use makehome as an automatic function that is a part of the registration process instead of ...
-1
votes
0answers
54 views

How to test JavaScript execution time? [closed]

My next project requires high execution speed for JavaScript; I need a way to test how fast the code executes and compare the results to the speed of other ways to do the same thing. If the execution ...
0
votes
0answers
40 views

Using JavaScript to find the correct offset in bundled files

I am currently making multiple parsers using PEGjs and have implemented my own partial preprocessor which using a RegExp finds and replaces '#include' directives with the desired files, resulting in a ...
-1
votes
1answer
46 views

What would be some ways to make a map app with a sidebar for sampling live music? [closed]

I'm a beginner developer with an idea but unsure the best technology to use to build it. [IF THIS IS THE WRONG PLACE, PLEASE KINDLY COMMENT AND I'LL PULL IT!] I'd like to make a simple app that has a ...
10
votes
2answers
363 views

Creating nested functions for purely aesthetic reasons?

I've always wondered what other programmers think about the idea of creating pure aesthetic functions. Say I have a function that processes a chunk of data: Function ProcessBigData. Say I need ...
0
votes
1answer
90 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 ...
-3
votes
0answers
18 views

JSP page - In a table <TD><input type = text name = “code”></TD> [migrated]

I have created a JSP page with a table containing two columns Code and Description ,the table data is input type="text" name ="code", the functionality which i have to implement is,if i type the ...
48
votes
3answers
4k views

Why do JavaScript frameworks/libraries have functions which already exist in pure JavaScript?

I wonder why frameworks/libraries have their own helpers although they exist natively already. Let's take jQuery and AngularJS. They have their own each iterator functions: jQuery.each() ...
0
votes
1answer
37 views

JSON - Ruby objects key naming

Ruby object has method/property: def tentakles_count 8 end JavaScript object has key/property: { justEnough: true } Now, when JavaScript gets serialised ruby object via XHR or WebSocket, ...
1
vote
0answers
96 views

What are the practical applications of nashorn [closed]

Oracle is putting a lot of effort into supporting Javascript on JVM. Rhino was quite capable as a JS engine, yet Oracle saw the need to create Nashorn and optimize it extensively to match V8's ...
0
votes
2answers
99 views

Minified version of JavaScript library under LGPL used on a site without copyright notice

On this site hackfind.com the autor put minified version of my library without any copyright notice. Is this violation of the LGPL. Note that using on a site is not a copy.
0
votes
1answer
67 views

What are security advantages of Google Caja over using the web worker API? [closed]

I am currently looking into Google Caja to run user-supplied JS code in the browser and in Node. So far, I understand, that, in a browser context, "cajoled code" disallows reading and messing with ...
1
vote
2answers
142 views

Developing a dynamic site with Node.js [closed]

I'm trying to get some pointers on what the best methodology to follow for a web application would be. First, some background: I've built two different APIs using Node.js where Node serves the data ...
0
votes
1answer
92 views

design patterns in Javascript - toggle functionality [duplicate]

My goal is to add some functionality to the bxslider script - in this case, I want to be able to enable/disable a keyboard event handler AFTER a slider is instantiated. I guess this code is self ...
-1
votes
3answers
186 views

How do you explain Higher-Order Functions to a layman? [closed]

I'm a 13 year old coder and for my technical interview I have to explain Javascript concepts to layman people so how do I explain how higher-order functions and how they are composed.
-3
votes
1answer
38 views

Text field Form [closed]

I have 2 forms that have text input fields. One is written in JavaScript and the other in ASP NET. I would like to prevent a single symbol, the dollar or string "$" symbol from being entered into the ...
1
vote
2answers
256 views

Why do concurrect languages tend to have more complicated syntax?

This is a question that's been on my mind for a while. Recently I've been checking out concurrect languages like haskell or Go or erlang. From my POV they have huge benefit in performance as opposed ...
2
votes
0answers
51 views

AngularJS approach for communication between components? [migrated]

My AngularJS web application has a view containing a grid with a toolbar for filtering data, above. It looks like this: As you can see, there is a toolbar above the grid. Note that both of these ...
0
votes
2answers
64 views

Intermittent flickering on mouse move [closed]

We have an internal website that is written in javascript and jquery and is only used in with ie8. Everything is fine but after a certain time, screen flickering starts to occur when the mouse ...
0
votes
2answers
128 views

Blocks of Javascript in Web Pages

I'm trying to find the best patterns for javascript usage in my sites, and in doing so I tend to look at source code at some sites (meetup.com, facebook.com, etc). One thing that sticks out at me is ...
0
votes
0answers
7 views

running javascript in java (compiler verion 1.4) [migrated]

quick question - 30 minutes of google yielded no good results. I am trying to run a .js file from my java application and i understand I can use the library javax.script. However, although there ...
0
votes
1answer
39 views

Preference to see if a field's value was changed js or linq object?

We have some requirements to send emails when various field values are changed in our system. It's an asp.net system using linq to sql with javascript/jquery. Is it preferred to check if a value ...
0
votes
1answer
67 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
106 views

Is parsing a submitted JSON object safe?

I have a RESTful API, built in NODE.js that does what you would expect it to: consumes data and then makes it accessible. Currently, data being submitted to my server is nested form data: ...
1
vote
0answers
51 views

Local Updates in Persistent/Immutable Data Structures

I'm getting into ReactJS and am intrigued but also confused about persistent data structures. I love the idea, but I'm not sure how to take my MV*, Mutable, Observable Bindings experience in designing ...
-3
votes
0answers
66 views

Boolean || optimization [migrated]

I'm just trying to optimize some code (From a beginners stand point). I have options passed into a function and I want to determine whether a variable is defined in the options object and set it ... ...
1
vote
2answers
49 views

JavaScript: Bundle a required, but common, polyfill in my library?

First, here are a couple of related, but not-quite-the-same questions: Should I include dependencies for which I have the source as projects in my solution? Depending on another open source library: ...
21
votes
5answers
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 ...
0
votes
0answers
65 views

Why aren't we all compromised on the internet? [migrated]

Well, I've been thinking about this for a while now. Within the last decade, we've used various ways to make our websites look dynamic and live. For example, in JavaScript, it's quite easy to send ...
1
vote
1answer
87 views

How does user confirmation box work?

How does the client know to send request to server only when the confirmation box result is ok and stay on page if cancelled? Also, is this mechanism any different in ASP.Net and ASP.Net MVC? I want ...
0
votes
0answers
78 views

Best practices in creating JavaScript styling API's: Balancing CSS and JavaScript

I have written a number of components for Durandal--DatePicker Widget, Tabs Widget, Radio Widget, etc. I'm having a little conceptual difficulty in how best to balance a styling API with CSS. For ...
6
votes
3answers
489 views

When and Where should we use hoisting in Javascript [closed]

I'm new to Javascript. I'm learning the concept of hoisting in Javascript. Based on the Javacsript tutorials in Mozilla website, I came across this word hoisting. According to those tutorials, ...
0
votes
2answers
127 views

Understanding Front End vs Back End Javascript?

I've been noticing lately, as I've played around with javascript, HTML5, and node.js for the first times that javascript seems to be a language that is used very differently (and with different ...
0
votes
0answers
8 views

Regular expression assistance [migrated]

I have a client's site that keeps getting hacked with XSS injections somehow. These XSS attacks are without fail in the banners section, and the banner ads need to have <script> tags to ...
3
votes
0answers
87 views

Architecture for a template-building, WYSIWIG application

I'm building a WYSIWYG designer in Ember.js. The designer will allow users to create campaigns - think MailChimp. To build a campaign, users will choose an existing template. The template will have a ...
0
votes
0answers
21 views

JavaScript StyleDisplay [migrated]

I have to admit that I have only slight in programming, but there are a lot of syntax especially property values that I do not know and seem to have issues getting the result that I want. My current ...
0
votes
1answer
67 views

how to manage new private variables introduced into class?

Whenever I want to add a new functionality, I introduce a new private variable into the class. Declare it just above the first method definition. leave a small comment. Set it in a certain method. And ...
0
votes
1answer
87 views

Building an organization-specific XML editor in HTML

I'm building a user friendly XML editor in HTML/JS. Looking for some general advice on how to build the editor UI and which approach you'd recommend on mapping the data to the UI. Details about the ...
0
votes
1answer
83 views

Twitter Bootstap: Backwards compatibility? [closed]

I work for a university Digital Services team. Our university's main website uses the Ektron CMS (I have my own thoughts about this, but that's irrelevant). Because we maintain a university website, ...
1
vote
3answers
152 views

What is the real difference between a minified and uncompressed file? What are the benefits of each?

I often see something like "uncompressed for development / minified for production" when reading blogs or downloading frameworks. What is the real difference between the two, and if minified is "good ...
-1
votes
0answers
4 views

Json Data Table Passing Failure [migrated]

My ajax is not working but my json result is return row count is 12 and it not show any alert message and i check in browser it shows 500 internal server error please some one help me friend if ...
2
votes
1answer
87 views

A* with possible multiple paths

Greetings I am currently studying pathfinding and I came across A* algorithm from this site https://github.com/qiao/PathFinding.js I tried to test A* with bi-directional and it is working great. ...