creating list of objects in Javascript

Is it possible to do create a list of your own objects in Javascript? This is the type of data I want to store : Date : 12/1/2011 Reading : 3 ID : 20055 Date : 13/1/2011 Reading : 5 ID : 20053 Date : 14/1/2011 Reading : 6 ID : 45652

Intercepting call to the back button in my AJAX application: I don't want it to do anything!

I have an AJAX app. A user clicks a button, and the page’s display changes. They click the back button, expecting to go to the original state, but instead, they go to the previous page in their browser. How can I intercept and re-assign the back button event? I’ve looked into libraries like RSH (which […]

Javascript dynamically invoke object method from string

Can I dynamically call an object method having the method name as a string? I would imagine it like this: var FooClass = function() { this.smile = function() {}; } var method = “smile”; var foo = new FooClass(); // I want to run smile on the foo instance. foo.{mysterious code}(); // being executed as […]

AngularJS Core vs. Angular JS Nuget packages?

This should be a stupid question, but I can’t for the life of me find any explanation of this. In Nuget there are two packages that looks like the main-packages: AngularJS Core and Angular JS. The former have The AngularJS Team as authors, just like the rest of the other angular modules, and ~200k downloads. […]

Connecting to TCP Socket from browser using javascript

I have a vb.net application that opens a socket and listens on it. I need to communicate via this socket to that application using a javascript running on a browser. That is i need to send some data on this socket so that the app which is listening on this socket can take that data, […]

How to check if Twitter bootstrap is loaded?

How can I check whether there is a bootstrap.js loaded on page (a file bootstrap.js may be compiled into another big JS file)?

Javascript shorthand ternary operator

I know that in php 5.3 instead of using this redundant ternary operator syntax: startingNum = startingNum ? startingNum : 1 …we can use a shorthand syntax for our ternary operators where applicable: startingNum = startingNum ?: 1 And I know about the ternary operator in javascript: startingNum = startingNum ? startingNum : 1 …but […]

List of all characters that should be escaped before put in to RegEx?

Could someone please give a complete list of special characters that should be escaped? I fear I don’t know some of them.

Social media buttons slow down website load time

I’m creating a simple and fast website, and I’m trying to optimize the site as much as I can. I noticed that social media buttons are slowing down the website by quite a lot. I’m including the Facebook Like Button, Twitter Button and Google+ Button. So I ran a few tests: Website without social media […]

How to use requestAnimationFrame?

I’m new to animation, but I have recently created an animation using setTimeout. The FPS was too low, so I found a solution to use requestAnimationFrame, described in this link. So far, my code is: //shim layer with setTimeout fallback window.requestAnimFrame = (function(){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(/* […]