Tagged Questions
JavaScript (not to be confused with Java) is a dynamically-typed language commonly used for client-side scripting. Use this tag for questions regarding ECMAScript and its dialects/implementations (excluding ActionScript). Unless a tag for a framework/library is also included, a pure JavaScript ...
0
votes
0answers
2 views
Only change one view with ui-router and AngularJS
Say you have a website that has 3 different routes, /news, /about, and /signup.
News and about are their own "pages", while signup is just an overlay that can be toggled on either /news or /about.
...
0
votes
0answers
2 views
Any way to output spec runner with grunt-contrib-jasmine?
So I've got grunt-contrib-jasmine running specs in PhantomJS. Is there a way to configure it so it always outputs _specRunner.html (to be run in a browser) instead of only upon errors?
0
votes
0answers
3 views
Javascript water ripple effect slowdown in framerate
I have written a super simple javascript to create a water ripple effect for a website, and the illusion if fairly effective, but I am having some issue with my timer lagging from numerous instances. ...
0
votes
0answers
7 views
Problems with bubbling event on dragleave
I have a working example with dragenter and dragleave events that highlight an area where the file should be dropped. This example works correctly.
Right now if I just add a single <span> ...
0
votes
0answers
4 views
Reloading iframe in javascript with txt from server
Ok, so I'm just starting with Javascript, and am trying to make a page in which I can view the different queues in our calling-system. The only way to get data outside of this calling-system is by ...
0
votes
0answers
4 views
GWT - Select all on text box after click
In my GWT project I have an Element desc which is represented with a TextArea. I need to select all the text when the user clicks on it. The JNI function selectAll() is correctly executed when the ...
0
votes
0answers
7 views
Why is this callback fired multiple times?
I'm integrating the Google+ JS API with my website and am having a curious problem. When my login button is pressed, I have it call the following function:
function googlePlusLogin() {
...
0
votes
0answers
2 views
How does proxyquire handle second level (indirect) requires of proxies modules?
If we have three modules names A, B and C so module A requires B and B requires C: what would be the effect of this call?
var A = proxyquire('A', {'C': mockedModule})
Would module B get the mock or ...
0
votes
1answer
19 views
My while loop for jquery, whats wrong?
Hey guys I'm pretty new to coding and was curious if you guys could find any errors with my code that is not working. Pretty much my goal is to make 293 buttons and have each button say Episode 1, ...
0
votes
0answers
18 views
javascript - setTimeout and clearTimeout issue
Thank you in advance for your help with this.
I'm writing a click event that sets an active state on an element, and then after a couple seconds, removes the active state. This is working fine with ...
0
votes
0answers
4 views
Playframework: a value is not a member of models
I am trying to access loadDiameterData() method of DataLoader class from my template view pipeIndex.scala.html.
I get the following error when I add the nextline to javascript section of template:
...
0
votes
0answers
10 views
Echoed, embedded php within javascript
Summary
Currently I have a webpage in which I am running some javascript to basically allow a user to create an UL list. I want to then process that list, saving it to a file on the server which will ...
0
votes
0answers
3 views
Session Store and Socket.IO in Kraken.js
I have a problem with Kraken. I also wrote them an issue, but it seems, they are not answering, and I really need an answer. I would like to join sessions with Socket.IO.
I started with this answer, ...
0
votes
0answers
6 views
How can I find when the HTML5 audio actually starts playing
I'm testing this in latest Chrome.
The problem is that the audio starts playing after some time (rather big, > 100ms) when calling play() method. Despite readyState is 4 and canplay has been fired by ...
-4
votes
0answers
14 views
Javascript workout error with array elements
I am curious to know that how to get alert massage punting element number (Brazil is 6) from the array instead of of putting a name of the countries. I have tried in several ways but It is not working ...
0
votes
1answer
8 views
When using “destination-in,” only the last thing drawn seems to render
I'm making a little library to emulate a curses-like interface in Javascript using a bitmap font. The font is a png with all the characters in it, and with a transparent background.
The method I'm ...
0
votes
0answers
6 views
Iterate over sockets in socket.io v1? “…has no method 'clients'”
Before I was able to write something like this:
io.sockets.clients().forEach(function (socket) {
socket.emit(signal,data);
});
Now, I cannot and I get the error Object #<Namespace> has ...
0
votes
1answer
8 views
scrollLeft with JQuery & Wrapper Width doesn't work
i still have a Bug here.
Here i got the Informations about Sliding horizontally with jQuery: scrollLeft: to END OF MAIN DIV not offset().left
My Site:
http://daka-media.de/
On the index Page ...
0
votes
1answer
7 views
Why can't i use AngularJS' ng-view and routing in combination with jade?
So i'm currently trying to learn about the MEAN stack. Express uses jade by default and although i know i can just as easily use html i thought i would try it out.
Now, when i try to route with ...
-6
votes
1answer
26 views
Please help me with JQuery JS to insert the new <div class=“myclass”> in between two divs: < [on hold]
Please help me to insert the new in between two existing divs with jQuery JS.The new div should be placed before the div with id=2 and after the div with id=1:
1
vote
2answers
21 views
Cancel incoming jQuery click event if mouse is moved after mousedown
I'm trying to prevent a click event from firing if the mouse is moved after the 'mousedown' event. Current I'm doing everything manually via conditionals and booleans. I still don't have it working ...
-1
votes
1answer
22 views
Call JavaScript function after 1 second One Time
I have successfully managed to make a div hide on click after 400 milliseconds using a setInterval function. My issue is that it runs continually, I only need the function to execute once. After a ...
0
votes
0answers
9 views
html2canvas with Proxy
I have a page that uses http://html2canvas.hertzen.com/ to copy an image in a div. This works great. When I load an external image into the div I add the proxy, this does not work. In my code I simply ...
0
votes
1answer
17 views
json.net serialization error using custom objects
I am getting an error when calling asp.net mvc action method returning a JsonNetResult. using the following code for that.
This is what I see in the response body. for some reason it is struggling ...
0
votes
1answer
11 views
Angular route wildcard possible/workaround?
I made a isActive function to set the active class on a menu element.
The function is as follow:
$scope.isActive = function (path) {
if (path == $location.path()) {
return ...
-2
votes
2answers
26 views
Why the .php gets saved/opened instead of the new page being showned when I click on a button?
I have the following generateLink function which say creates the page for LPE but when I click the button in the LPE page it asks me if I want to open the IAT.php file instead of showing the ...
1
vote
3answers
21 views
Insert div into random location inside a container of divs
How do I insert a div into a random location inside a container of divs? Similar to Insert a div in a random location in a list of divs except I'm not using a list.
Right now it appears inside a ...
0
votes
2answers
18 views
Append JS to not include a % character
I have one JSON value which is writing into HTML and CSS from the following JS:
$('#team2-keyPlayer2-rating').css('width', data[team1].keyPlayers.keyPlayer1.rating);
...
0
votes
1answer
4 views
Custom Highcharts Context Menu Button Appearing in Every Chart on Page
I have a page with several charts, and I need to be able to add specific options to the exporting context menu for each chart. This is the code I am using:
...
1
vote
0answers
6 views
Chrome wont keep an extension when downloading a .csv file from javascript
Our application takes data from our display table and downloads it for the user in .csv format without the user needing to name it. This used to work but in the last few days Chrome must have changed ...
0
votes
4answers
20 views
Javascript: Internal array is not reset to outer objects
How do I grant access to inner properties of objects in the right way? This is what does break my application:
I have an object that handles an array (simplified here):
function ListManager() {
...
0
votes
0answers
18 views
<iframe> links disappear when uploading website [duplicate]
So I've fully made my website, it perfect when i test it from my computer, but when i upload it to the server my iframe links Disappear. one is a youtube video and the other is a weather Widget. they ...
0
votes
2answers
30 views
Clicking div inside of div bypass javascript event
So I'm not entirely sure how to word this in a search engine. Say I have the following:
<div class = "outer-box">
<div class="inner-box"></div>
</div>
I really want to ...
0
votes
0answers
7 views
HMAC secret key client storage
I've read numerous articles about using HMAC and the secret key for client authentication in a RESTful client (Javascript) application today.
Still, I don't find a single source that is able to ...
0
votes
2answers
14 views
How to select all elements with particular ARIA value using jQuery?
Given i have a sample page that looks like this:
<!DOCTYPE html>
<html>
<body>
<h1 aria-controls="name1">heading</h1>
<p ...
0
votes
0answers
11 views
Using AJAX data / variables to target a specific PHP Switch: Case (Run a PHP switch from AJAX)
Part of an Oauth program I am writing involves updating information to a database which is linked by a single php file. The PHP file has simple switches like so
switch ($server_functions) {
case ...
0
votes
0answers
2 views
Conflict with Ember.js and URL fragment (#) with Ecwid
I'm using Ecwid with my Ember.js application, and I ran into a conflict. In short, Ecwid loads some JavaScript that embeds an e-commerce store into the page. The problem is that Ecwid and Ember both ...
0
votes
1answer
14 views
How can I convert a XML url into html using javascript or php?
I have this url: http://bws.buscape.com/service/offers/lomadee/65717751673178504d42633d/BR/?sourceId=28400481&advertiserId=5889&page=1
Which, as you can see, does not endup with the .xml ...
0
votes
1answer
11 views
Filtering a List via a Sidebar
There are two lists of items. One for your blog posts, and one for the authors.
var app = angular.module("Blog", []);
app.controller('PostCtrl', function($scope) {
$scope.posts = <%= ...
0
votes
4answers
26 views
How to display pop up div for dynamically created database elements
I have a grid of 40 thumbnails of staff images and I'd like to display additional text (mainly their biography) when the user hovers over each element.
I've tried using Jquery PowerTip ...
0
votes
0answers
3 views
content.googleapis.com/static/proxy.html not returning html to gapi causes gapi.load error
This is a bit strange. Occasionally the gapi javascirpt client has an error when starting up. Especially when going incognito for the first time etc:
TypeError: Cannot read property 'value' of null ...
0
votes
0answers
5 views
ASPX Pages with JAVA Object And File Array to ASXM function
I have an ASMX Function that is able to Receive And Process My Object that's generated on the Client Side Web Interface (Javascript, jQuery, and Datatables)
They View a Page, make multiple Edits and ...
-2
votes
3answers
11 views
Error undefined is not a function for .click()
I keep getting undefined is not a function error and I don't know why, can anyone help shed some light.
here is the whole bit of code
(function(){
var sliders = ...
0
votes
1answer
10 views
XmlHttpRequest cross-origin request error when trying to load a local file
We have a file being loaded by a javascript library (d3.tsv). It is being loaded by relative path "data/LineChart.tsv" inside the javascript code. It is not working
XMLHttpRequest cannot load ...
1
vote
4answers
23 views
Input field not appending to td
I am trying to create a table with an input field dynamically but my code ends up creating an empty table.
var calcDiv = document.getElementById("calc_div");
var calcTab = ...
1
vote
1answer
13 views
Trying to set a default background picture using Angular.js
I'm new to Angular.js and I'm running into a problem. I'm using ng-repeat to iterate through a list of news items. Each item has a Title and Body, but will have an optional picture url that will be ...
-1
votes
3answers
32 views
jQuery: determine the [server's] Document Root
in PHP you can do get the document root by: $_SERVER['DOCUMENT_ROOT']. Ej:
PHP
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
$path = '/example/directory/';
$file = 'some-file.html';
include( $root . ...
0
votes
0answers
2 views
dc.js month chart uneven spacing between bars
I am creating a chart using dc.js and as you can see the spacing between the months are different. The most notable is between February and March because February only has 28 days. How do I have even ...
0
votes
0answers
5 views
Kendo scrolling listview not working
I am trying to scroll a list view to the top when a button is clicked, however it doesn't seem to be working.
Here is an example...
http://jsbin.com/jofijowa/1/edit
Essentially, I am trying to move ...
0
votes
1answer
12 views
Google Maps v3 markers not refreshing
So I have 3 Divs with hidden Lat Lng inputs, and some ajax pagination to change them out. On the initial load, I have a script that turns each one of the three pairs of Lat Lng inputs into a marker ...