Tagged Questions
JavaScript is a dynamically-typed language commonly used for client-side scripting. It is NOT the same as Java, and has hardly anything to do with it. Use this tag for questions regarding ECMAScript and its dialects/implementations (excluding ActionScript). If a framework or library, such as jQuery, ...
0
votes
0answers
7 views
How to adjust width of child elements div which comes up using js tree dynamically json data
I have a tree structure
-<div id="main" width="320px">a
- <div id="child1" width="300px"> b
- <div id="child1" width="300px"> c
- <div id="child1" width="300px"> d
...
0
votes
0answers
6 views
Node and Document method selection basis?
Node creation methods like createElement, createTextNode, createComment is defined on the Document interface while Node insert/delete methods like appendChild, removeChild is defined on the Node ...
0
votes
0answers
13 views
How to develop interactive country map
Want to create an interactive map but not getting any idea of how to start. Can anyone help me out? Please refer any javascript or any other library that will help to create the map, i am including ...
0
votes
0answers
7 views
utf-8 encoding in webworker
In a web application with <meta charset="utf-8"> I get the ID3 tags of mp3 files like this:
var reader = new FileReader();
reader.onload = function(onloadEvent) {
var mp3Data = new ...
4
votes
1answer
10 views
making a div fill the entire screen with d3
In jquery it's easy enough. Just do the following:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<body style="margin: 0; padding: 0">
...
0
votes
0answers
14 views
javascript bananacal
I wrote a javascript Code for a project I have to do for school. My Idea was to display random bananas on the screen by clicking on a button.
So I wrote this code .. but it doesn't work!
...
0
votes
1answer
13 views
Can not modify properties added to Number.prototype
Could somebody please explain this behavior in JavaScript?
var a = 6;
a.constructor.prototype.prop = 5;
print(a.prop);
a.prop = 4;
print(a.prop);
Then I run it in ideone:
5
5
I understand that a ...
1
vote
2answers
15 views
Update page every 2 sec - Uncaught TypeError
In this program - page should update every 2 sec.
But running is interrupted by - Uncaught TypeError: Cannot set property 'value' of undefined at this line - document.formal.input.value="Count: " + ...
0
votes
0answers
14 views
Can an SVG background be interactive?
I have an SVG image that I created. It is a rectangle with a circle inside it. The circle follows the users mouse using JavaScript. The image is represented by the following code:
<svg ...
0
votes
1answer
7 views
D3.js .selectAll not working
Working through this
http://flowingdata.com/2012/08/02/how-to-make-an-interactive-network-visualization/
In this line of code -
var node = ...
0
votes
0answers
10 views
Getting up-to-date API response from server to client
I have a couple conceptual questions related to a data visualization project I am working on, which requires pushing semi-realtime data from server to client.
I have a python script that takes data ...
1
vote
1answer
21 views
Referencing and changing attributes of HTML button inside container
Below is the HTML code I am playing with. All it does is create an element with two buttons: "Element1" (TitleButton) and "Add". By clicking on "Add" the element is cloned and assigned id="element 2". ...
0
votes
0answers
21 views
Pulling values from an array based on date?
I have an array of data points, [date, value], like so...
data_points = [[1310279340, 1], [1310279340, 1]]
I need to create an array based on "milliseconds ago", with ten values for each second, ...
0
votes
2answers
13 views
How can I render content in my Jade template using functions in express?
I've got a working user register/login page, the only thing left is making content based on whether the user is logged in or not. After reading I came up with this:
app.use(function(req, res, next) {
...
0
votes
0answers
13 views
Redirect users to mobile view of MediaWiki wiki
I'm currently stuck figuring out how to redirect users on certain devices to the mobile version of my MediaWiki installation. The built-in link (provided by the MobileFrontend extension) used to ...