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 various dialects/implementations (excluding ActionScript). Unless a tag for a framework/library is also included, a pure ...
0
votes
0answers
2 views
How do I clone React component DOM nodes?
I have a react component where I'm trying to render a Excel-like grid with a fixed header and fixed first column. The desired behavoir is:
scroll left & right: 1st column stays in place while ...
0
votes
0answers
1 views
Fitting hexagonal shapes together
I have a series of hexagons of varying size, composed of smaller 'unit' hexagons.
Here is the HTML for one hexagon:
http://i.stack.imgur.com/mnnCi.png
I then need to position all of them in such a ...
-4
votes
0answers
11 views
Parse JSON data using Javascript as a Collection
I am using NodeJS package twitter-js for fetching tweets. I have the data in the following format which I want to save one by one into database. But I have problem to save in one by one:
Code:
...
-1
votes
0answers
17 views
beginner issues with form input validation
Im new to learning javascript and ive been trying to get a small validation function to work to no avail. can some one show me where i am messing up? thank you in advance for you help with this ...
0
votes
0answers
7 views
AngularJS and JQuery UI Tabs
I've seen some samples of tabs with AngularJS, and very few about JQueryUI tabs with AngularJS, so I tried to create two directives to create the tabs container, and the tab items.
Here is the sample ...
0
votes
0answers
7 views
Autocomplete returns results but does not render menu
I am unable to render a menu from this autocomplete function. I have tried changing the items.autocomplete to ui-autocomplete-items.
I have tried using .autocomplete('instance') instead of ...
1
vote
0answers
3 views
bacon.js: flatMapError on ajax request
I have the following Bacon.js code:
getUsers(urls).onValue(printUserInfo)
function getUsers(urls) {
return Bacon.fromArray(urls).flatMap(function(url) {
return ...
-1
votes
1answer
8 views
Submit Data in Inputs to Database with Javascript via SQL in PHP
I am developing this website, and I'm currently working on the This widget already exists feature. The link takes the user to a page where they can type things in input and they can send it.
When the ...
0
votes
0answers
5 views
Error displaying XML response (JavaScript)
I've been using the Merriam-Webster API to put together a word search tool, but I am having trouble using the XML to display the response. The current XML is here, and I have my code here. What am I ...
0
votes
1answer
19 views
Error getting document by id
This code is giving me an error anyone know what I am doing wrong? here is the error "Uncaught SyntaxError: Unexpected token }: file://10.0.0.154/Shares/csc443_yatzee/yatzee.html"
function ...
0
votes
0answers
10 views
Hover in each checkbox
Hi I'm trying to make a hover in each checkbox. What I now have is that the hover only occurs in the first checkbox. I have also recorded myself to show you more clearly what I actually want:
link: ...
-1
votes
0answers
11 views
A/B testing for webpages (without saas). Any ideas?
I have website. I would like to test webpages by myself (Without any saas service).
Does anyone has experience or ideas how to do it (at the my sole server, without DNS redirection)?
I have only ...
0
votes
0answers
8 views
How do I serve socket.io over HTTPS with Node?
The problem:
I just successfully got my Node.js server all working properly setup with SSL, great. But then I see this:
[blocked] The page at 'https://www.mywebsite.com/' was loaded over
HTTPS, ...
0
votes
0answers
12 views
Force a browser to load new javascript file [duplicate]
I recently updated some javascript to pull information from a slightly differently place on a click event but after uploading the new script I noticed that things were not always behaving properly.
...
-2
votes
1answer
22 views
JavaScript if statements combined
If I wanted to simplify the following:
if ($rootScope.map.visible == 0 && $rootScope.user == $rootScope.mapuser) {
var owner = "me";
} else if ($rootScope.map.visible == 1) ) {
var ...
0
votes
2answers
17 views
Clicking away from form
I'd like to have a popup when the user clicks away from the form. Here is what I have now:
jQuery("#joborderform").on('blur',verifyDisconnect);
function verifyDisconnect()
{
...
0
votes
0answers
2 views
Google Chrome - select audio output from Javascript?
I have in my PC two sound card one is built in and another is USB sound card. I need to predefine the sound output. So i tried following code but its always playing sound in my first sound card.
How ...
0
votes
1answer
16 views
Angular Controllers Firing off more than once. Only certain ones
I have markup that has the following and then I have different sections of the app defined in different files. The problem I am running into is that the controllers that are on the main app page on ...
-1
votes
0answers
6 views
Payment geteway limit of trial version
I am trying to create a music platform similar with soundcloud. I wish to ask you if anyone know how to create that limit of 30 days trial or maybe less. I am sorry if I didn't tagged well.
0
votes
1answer
10 views
Why does push not work on this cookie array?
This works fine:
$cookies.animals = []
$cookies.animals.push({cat: 'meow'})
console.log($cookies.animals) -> [Object]
But identical code inside a factory function doesn't work:
addAnimal: ...
0
votes
1answer
15 views
ckeditor: “a is undefined”
I just added CKEditor to my website, but I'm getting the following error in my console:
I followed the installation guide as it's written so I have no idea what's wrong.
Here's, briefly, what my ...
0
votes
1answer
20 views
How Enumerate the Prototypes of Array
If I create an array like this...
var arr = [1,2,3];
...the variable "arr" will have various prototypes like "toString" and "forEach". How could I enumerate the names of all the prototypes of ...
-1
votes
0answers
10 views
FlipClock.js Plugin - How to use attr to modify CSS?
How would I go about calling a function from this plugin and using it to change the css based on a condition?
My code looks something like this:
if (FlipClock.getHours() < 5)
{
...
0
votes
0answers
3 views
Kendo MVC Grid Filter Customization not working
I have tried to follow the Kendo example (http://demos.telerik.com/aspnet-mvc/grid/filter-menu-customization) but I am clearly missing somthing...
The grid loads data just fine. The javascript ...
-2
votes
4answers
34 views
jQuery .click() not working as expected
There's an image which I want to change when elements are clicked. I have the following piece of code:
<script type="text/javascript">
$(document).ready(function()
{
var toggles = ...
0
votes
1answer
13 views
Pulling an Array from API (Twitch)
I am in no way a coder, all I know how to do is manipulate a bit of code to work, I managed to pull a Live Follower and Views from Twitch's API, but I am having trouble with this code that pulls the ...
0
votes
0answers
17 views
Create and download file using AJAX and php
My main problem is dsnt working downloads on Safari. For now i'm using FileSaver.js. It's working on all browsers but on safari, file is opened in new tab instead of downloading it.
File is creating ...
0
votes
0answers
7 views
Google map disappears
I have a .click jquery function when to take the longitude and latitude and pan the map to this point while clicking on the link.
I have tried this but when I click on the link the map disappears only ...
0
votes
1answer
8 views
make highlight table Row Without external library using JavaScript
is there any possibility to Highlight a table row without external JS Library but using just JavaScript ?
<table>
<tr>
<th>Nom</th>
<th>n°</th>
</tr>
<tr ...
0
votes
0answers
3 views
two google charts on one page with super proxy
How can I have two google charts on one page? I'm using super proxy to get JSON table from google analytics API.
Currently, only the first chart (Table) is shown. Missing the second chart.
My code ...
0
votes
0answers
10 views
Load JavaScript in only one webpage
I want a JavaScript to work only in one webpage of my forum, so I used this code:
if (window.location.href.indexOf('/u1') != -1) {
But it also affects webpages like /u11, /u12, /u13, /u14, etc.
...
0
votes
1answer
6 views
How to refer to each property of an object in an array of objects in MongoDB MapReduce JavaScript query?
How to refer to each property of an object in an array of objects in MongoDB MapReduce JavaScript query?
Here is my data:
{
"_id": ObjectId("544ae3de7a6025f0470041a7"),
"name": "Bundle 4",
...
-3
votes
0answers
26 views
Admin login/logout code
I'm trying to make a website with php, MySQL and JavaScript but my question is how to make a login and out part in the website for the admin to edit, delete or add information , and upload photos how ...
0
votes
0answers
4 views
Google Analytics implemented at JavaScript not tracking on Android Device
I am working on a Hybrid Model Application Development. My base code is in AngularJS and built the app with bootstrap and HTML5 for responsiveness and have Xamrin at the middle layer to provide me ...
0
votes
1answer
9 views
How to understand escaping in this PL-SQL query embedded in Java Script
var queryString="select replace(B.entity, '''','\\\''') from B"
I am assuming the next line will fire this query at an Oracle data source.
I think it says replace in the raw data response any ...
0
votes
2answers
17 views
In AngularJS, how do I bind a directive into an element other than the directive's root element?
I want a directive that I'm creating to appear inside an element outside of the scope of the template that the directive appears in.
My issue is that I'm trying to get a lightbox to render over all ...
0
votes
1answer
18 views
Moving div due to navbar content from above
I am using Bootstrap to make navigation tabs on my page. Currently I have a two nav bars within one `div. They work fine. However, when I panel through the tabs, the content changes height causing the ...
0
votes
2answers
24 views
HTML DOM and jQuery DOM in one simple line?
I am working on some code in Javascript using a HTML5 canvas and jQuery. I am using getElementById to get the canvas and I'm using $('canvas') to get the canvas to use a jQuery function.
The problem ...
0
votes
1answer
17 views
FullCalendar, possible to set selectable false but allow select slot
I'm making an application with FullCalendar.
I noticed that with selectable set to true, the user was able to select multiple weeks or time slots which was not desired. On the other hand when I set ...
0
votes
0answers
5 views
TweenMax “running” all the time
I'm using TweenMax and TimelineLite. Upon start I initialize all my timelines with paused:true. I also use paused:true with all created Tweens. I create my tweens like this:
var tween = ...
0
votes
1answer
6 views
Displaying CSV Headers using PapaParse Plugin
I am using the PapaParse plugin for csv files. I have this function below that creates a table to display the CSV results.
function handleFileSelect(evt) {
var file = evt.target.files[0];
...
0
votes
1answer
13 views
C# Web Browser Instagram login page is not loading
I'm trying to login to instagram with c# webbrowser. But the login page is not loading. There is only a blank page.
By the way, my internet explorer opens the page.
private void Form1_Load(object ...
0
votes
2answers
10 views
Analytics.js - How To Insert Current Page Dynamically as Label
how can I get into this line:
<script type="text/javascript">
$('form').submit(function() {
ga('send', 'event', 'orderform-step-2', 'submitted', 'http://example.com/page1', '10');
});
...
0
votes
0answers
8 views
ExtJs 5 - launch function not executed in Ext.application
I am new to extjs, and I try to integrate extjs 5 with django 1.7 on my localhost. I have set the backend and got the rest api work (at /api/), as at https://github.com/MaZderMind/django-vs-extjs , ...
0
votes
0answers
9 views
Use CSS for Vector Layer styling in OpenLayers
I am using OpenLayers to show multiple Vector layers based on some API calls. Currently, I style these layers using a StyleMap-Style combination for each layer, like so:
var layer1Style = new ...
0
votes
0answers
7 views
How to set priority of validation when using directives to extra validate?
I added extra validation to inputs by adding a directive.
The problem I'm having is with the validation order.
I need this: when required and my-attribute set required will validation will be ...
0
votes
0answers
9 views
SVG: scale and “zoom”
thank you in advance for reading.
I'm using the lib SVG.js, and I have a group of element.
var group = draw.group();
It's a map of tiles. I can use the mousewheel event to handle zoom in & out. ...
-4
votes
0answers
42 views
What's wrong with this code why it dosent count down 60 seconds?
<!DOCTYPE html>
<html>
<head>
<title>change picture</title>
<script type = "text/javascript">
function displayNextImage() {
x ...
0
votes
0answers
20 views
Function returns false when checking for boundries of a circle
I have a simple canvas where you can drag a circle around but the center point always stays in the circle, the center point being represented by a red dot.
The problem is its not working, the circle ...
1
vote
1answer
9 views
Inheritance and overriding Knockout computed observable
I've been working on making my javascript app more scaleable. The app uses knockout.js to bind a grid of some type of database item to be editted and updated by the user. I'm now going down the path ...