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)

-4
votes
0answers
28 views

Developing skills in Node.JS, Angular JS and Backbone.JS from scratch [on hold]

I have some skill in Core Java, C# and JavaScript (Basic). Now, I have only 2 months of industrial experience. I have get oppourtunity with such a project where I am working and learning Angular JS. ...
-4
votes
0answers
16 views

How can move my images to the bottom of a webpage and link them to websites [on hold]

/* *This code will make the image large when clicked on. It uses jQuery. */ $(document).ready(function){ //Custom effects with animate. $('img').on('click', ...
0
votes
0answers
70 views

When and when not to use OOP in Javascript? [duplicate]

This post suggests that javascript code should be written in object oriented design. He gives a trivial example of making some ajax call and alerting the response. From the world I come from (c#) he's ...
0
votes
1answer
56 views

How to avoid circular patterns in Node?

I'm new to Node and JavaScript (well, asynchronous programming in general) and I noticed when I was working on a project that the following code is a circular pattern and that these are bad practice ...
-1
votes
0answers
18 views

Is it possible to Access a page control from webMethod? [on hold]

I Have a WebMethod using vb like this.. <System.Web.Services.WebMethod()> _ Public Shared Function RedirectWithToken() Dim objSeatPage As New SeatSelectionCore ...
-3
votes
0answers
49 views

Preparing for a 3 hour interview for a different kind of role [on hold]

I'm currently working as a Haxe game developer and I've been there for 2.5 years. The current manager and I don't get along too well so I'd like to move on. I'd also like to get out of the gaming ...
-3
votes
0answers
94 views

Why are JavaScript Frameworks so popular despite the hate? [on hold]

I've been working with frameworks like AngularJS for a bit and I've had my frustrations, but I know JS frameworks are a popular way to go about constructing a web application so I'd like to keep ...
16
votes
1answer
469 views

What is the term for an anonymous JavaScript function that's called immediately?

I'm writing a JavaScript style-guide for my team, so that we can organise and contribute our documents easier. But I've hit a small bump which is where my question applies... What am I supposed to ...
2
votes
2answers
92 views

Javascript Password Security

I'm extremely new to javascript (so I know there's already a thread here), but I couldn't understand how to implement it. My code is pretty much identical: <script language="javascript"> ...
-2
votes
0answers
13 views

Best Way to join reactjs and cakephp without v8js or nodejs? [on hold]

Hello i have some experience using cakephp but i really don't like the way the ui is handled, so i look at reactjs from facebook (Called as the View of MVC) and it looks like an standard good to ...
-4
votes
0answers
38 views

Best resources for beginning front end development? [on hold]

My husband is interested in learning how to code. He is currently getting a degree in Psychology and isn't sure if he'll find a good career out of it so is considering being a developer as a fallback. ...
0
votes
1answer
25 views

Is it possible to use on focus event on form..?

I tried to find when and on what onfocus works.. Can some one tell me is it possible to trigger event when some one is viewing current form ?? I know it works on input,dropdown and textarea.. but ...
-2
votes
1answer
47 views

(New Programmer Alert) As I'm learning Javascript and Jquery What Else Should I learn? [closed]

I'm a new programmer and kind of over whelmed by all the other awesome stuff there is to learn. I've gotten HTML and CSS down and now want to make my websites more interactive. I know with Javascript ...
-3
votes
0answers
21 views

How to pass input text box value from previous page to input text box in the new page with Javascript? [closed]

Any help appreciated.. I have been stuck on this for a while.. Right now once it gets the searchVal from the old input text box, it redirects to new page and then stops doing any javascript after ...
-1
votes
0answers
18 views

upload a file to sql server and download it from sql server in asp.net mvc web api using knockout js [closed]

I'm very new in asp.net mvc web api (APIController)and knockout js but i want to upload a file to sql server and download it from sql server in asp.net mvc web api using knockout js , i'm looking for ...
-2
votes
0answers
9 views

Problem with device orientation code in Firefox for Android [migrated]

The following code is supposed to make a map on a web page be the only element that is displayed on the page when the phone is turned sideways, and then re-adds the other elements when the phone is ...
2
votes
6answers
664 views

Replacing C with JavaScript as an introductory programming language [closed]

I am a new teacher at polytechnic where we teach web development and basic software programming. For years, the institution where I teach have taught C as their introductory programming language to ...
0
votes
2answers
62 views

Using PHP without mixing presentation logic

I'm conceptually designing a website / application and trying to come up with the correct separation of concerns. The basic technologies I'm settling on are: MySQL, PHP (Laravel), HTML/JS (jQuery). ...
3
votes
2answers
67 views

why regex, when using global search and {0,} quantifier, match the end of the string?

I have asked a question here about js, regex, quantifiers and global search. I've understood finally how this works, but, let's take a concrete example and then I`ll write my question. Based on the ...
2
votes
3answers
186 views

How does Chrome V8 work? And why was JavaScript not JIT-Compiled in the first place?

I have been researching Interpreters/Compilers, then I stumbled across JIT-Compilation - specifically Google Chrome's V8 Javascript Engine. My questions are - How can it be faster than standard ...
0
votes
0answers
43 views

Vertical Single Page App libs/patterns?

Lately I've noticed a trend amongst some website homepages to present information in a vertical fashion, forcing the user to scroll down to continue reading the content. As you scroll down, a state ...
-1
votes
0answers
61 views

How to use a href link just like a button? Which can perform some event? [closed]

I need the help in web programming concept. I want to create a link which will perform a login redirection. I want a reader view which will display some information To perform login we have to open ...
-4
votes
0answers
80 views

Javascript entry-level interview [closed]

I like to program and have been in pursuit of a developer career. I have some basic knowledge in most programming languages out there like C++, C#, Java, PHP, Python, etc. I also know HTML/CSS and ...
-1
votes
0answers
38 views

Nested website navigational menus [closed]

So, I have created a website that has a navigational menu made up of nested unordered list elements. For example, <ul> <li>Home <ul> <li>About Us</li> ...
0
votes
0answers
18 views

dynamic api code generation in nodejs

We are using nodejs and cassandra for backend stuff. In past few months we wrote same CRUD code for different apps. I am thinking of some way to automatically generating CRUD code. I came across ...
1
vote
1answer
144 views

What would be a reason not to embed JS in C? [closed]

I'm working on an opensource application that processes JSON in C, because I would like to make it easier for people to help me in the project and because JSON is so close to JS. I want to embed a JS ...
1
vote
1answer
74 views

Which JavaScript Template (jst) syntax uses double-brackets, (e.g. [[ and ]] )?

I'm looking at the source code for a Rails application that uses Backbone and there are template files with .jst.ejs extensions. The templates include HTML with lines of JavaScript wrapped in ...
0
votes
0answers
43 views

JavaScript: How future-proof is using the onpaste event? [closed]

I've been building a jQuery plugin which, along the way, required me to handle the user pasting a value into an <input> element. I've handled this by using the onpaste event. However, ...
0
votes
1answer
48 views

Is there a relationship between a data source (JSON) and the Model that consumes it?

I have put together a large quiz data structure. It is in JSON format but I guess it could be XML etc. It may look something like this simplified: { "quiz":{ "title": "Welcome to Quiz" ...
-2
votes
0answers
29 views

Angular service with different angular app [migrated]

Here i am using angular service.In my case i am getting value for first app but not for second .please help me . thank you. here is my html:- <div ng-app="mainApp" ...
0
votes
2answers
82 views

How can I show and hide a single field across my web application through a checked value?

Let's say I have a field called "FooName" and I have "FooName" in several places across my web application (ASP.NET MVC4). I have a check box that allows me to turn "FooName" on and off across the ...
-1
votes
0answers
5 views

D3 show segment of series data [migrated]

I'm looking for advice on how to tackle the following chart in D3.js: I have data in the following format for the 7 series shown Learning Disability AgeBand | Percentage 0-4 | 0.02 5-9 | ...
4
votes
1answer
191 views

Is localStorage under The Cookie Law?

I'd like to avoid having the cookies banner on my websites where possible. Could I store session id's in localStorage to bypass implementing the banner?
1
vote
1answer
50 views

Does requestAnimationFrame() really align with monitor refreshes?

Take this code: requestAnimationFrame(function (timestamp) { console.log('one', timestamp); }); requestAnimationFrame(function (timestamp) { console.log('two', timestamp); }); // logs: // ...
0
votes
1answer
224 views

Is writing code chronologically the best way for readability? [closed]

So I've been writing a lot of JavaScript lately. Despite what many people say I think JavaScript can be a simple and beautiful language. What I've pondered of late is how to structure the code so it ...
0
votes
0answers
57 views

Why does a lot of Angular source code avoid enclosing the contents of a file in a closure?

I am assuming because it is a standard practice in the Angular world that, any sort of module system has to be wrapped as an Angular module and angular should be the only global variable used which ...
1
vote
1answer
63 views

The difference between bind and _.curry

So JavaScript's bind supports currying, but most people use some other library like lodash or ramda to do currying. From first impression It seems like bind supports context changing, since that is ...
0
votes
0answers
23 views

JavaScript top and left positions not working? [migrated]

I have this code in JavaScript on a html file but when i run it the image that i have doesn't move when i change top or left. Why is this happening, i have been searching for hours and copying tones ...
0
votes
1answer
52 views

Should the server and client portions of an SPA be separate repos? [closed]

I'm building an SPA (my first), and I had a question about organization. (I'm using Node.js for the server and Browserify & React for the client, and that's mildly important later). I'm unsure if ...
2
votes
0answers
45 views

Mapping different XML and CSV feeds

Not sure if this is the right venue to be asking this but here goes. A little background. I'm trying to build an ecommerce app that would allow sellers from other venues--like, amazon and newegg--to ...
2
votes
0answers
105 views

is this a valid javascript design pattern when many instances are required?

I have some code that I'm refactoring, right now its just a list of functions, primarily jQuery. The code is a form builder. The user adds sections, questions etc using jqueryUI drag/drop/sort. They ...
1
vote
1answer
106 views

What is the name of the pattern for passing an incomplete object to a constructor? [closed]

Several times in javascript I've seen a constructor function take in one parameter. The constructor will initialize all the fields for the object to default values and then use the parameter to ...
2
votes
5answers
274 views

Securing ajax calls to rest api

I need for my app to consume a rest api service and since I will call it from javascript/jquery i need to expose it to the end user. In this case I would also need to expose credentials to the end ...
1
vote
1answer
62 views

Best place to declare functions in this example

Suppose I have code that accepts html GET requests: server.get('path/to/some/endpoint', function(req,res) { function a() { //function goes here } } Is it better to declare functions ...
0
votes
2answers
113 views

The correct way of declaring & instantiating variables ( Javascript ) [duplicate]

I have seen other peoples code and each person has a different way of declaring variables. And I have been told by quite a few people that declaring variables in the Global Scope is wrong. My ...
0
votes
1answer
96 views

Switching over to the real ES6 / ES2015 [closed]

It is exciting time of having Babel and being able to use all nice nice features. It got me thinking, what happens in the future? Nobody really talks about it. I mean some browsers would eventually ...
-1
votes
1answer
53 views

Short Circuit Execution [closed]

Modify the car painting example car.color = favoriteColor ||"black"; so that the car is painted with your favorite color if you have one; otherwise it is painted with the the color of your garage: ...
4
votes
1answer
233 views

When to use Prototypes & the correct usage of Prototypes ( Javascript )

I have been programming in Javascript for a while and I am quite comfortable with it. And I know the basic concept of prototypes and I have also used them a few times. But one thing I can't figure out ...
3
votes
1answer
107 views

Importing plain javascript libraries in an AngularJs application

I am working on an AngularJs project which is getting bigger very fast. Currently I need to store some user data, so I was using $localStorage for Angular. But I had a problem, as the application is ...
-1
votes
0answers
26 views

Changing CSS Div Position Value Given in % Using Javascript [migrated]

Changing CSS Div Position Using Javascript I am really new to javascript, and I have searched for an answer to my question to no avail. I want to be able to click a button and change a div value ...