Tagged Questions
JavaScript (not to be confused with Java) is a dynamic, weakly-typed language used for client-side as well as server-side scripting. Use this tag for questions regarding ECMAScript and its various dialects/implementations (excluding ActionScript and Google-Apps-Script). Unless another tag for a ...
0
votes
0answers
4 views
Node background-image not working (Only images from Flickr display)
I am having trouble getting the background-image node property to work.
I am simply using the "Images & breadthfirst layout" demo as a test example (located at https://gist.github.com/maxkfranz/...
0
votes
0answers
6 views
How to hide notification when new one comes up with toastr
I have notifications popping up in my application, I want when new notification comes, the old one to hide(I don't want two notifications at one moment). How to get that effect with toastr?
0
votes
0answers
14 views
Convert multi-depth array of arrays object to array of objects
I'm having a little trouble converting an array of arrays-like object to an array of objects. I am using the reduce method, and it is correctly converting the array data to an object for the first set ...
0
votes
0answers
11 views
How to set a time zone to a timer JS/HTML
I got my timer that i suppose its counting down using my PC/server time zone. But i would like to be able to select the time zone how could i proceed? I've tried lots of things but none of them work. ...
0
votes
0answers
4 views
Do onMouseOver and onClick work differently internally?
I have a react component where on onMouseOver the dropdown will display, but when I make it an onClick it doesn't work. Currently I have it implemented like this.
onMouseOver={ () => {
if (this....
0
votes
3answers
31 views
How can I stop a page from refreshing after a certain amount of time javascript
I want my page to reload every so often, but if a user is inactive for say 5 minutes I want to stop the page from reloading. I have an example on http://codepen.io/tetonhiker/pen/gLeRmw . Right now it'...
0
votes
0answers
6 views
Printing Maps from Google Maps API JS V3
I have a single-page web app using Google Maps API JS v3 that our shop manager uses (via Chrome) to print customized directions for our drivers. (The reasons for customization aren't relevant to the ...
0
votes
0answers
19 views
JavaScript - HTTP Request for Each Element in Array
I have a script that sends HTTP requests to a website to get documents, the document IDs are kept in an array. I want to send a request for each array element and return a message based on the status ...
0
votes
0answers
3 views
fengyuanchen Cropper TypeError: URL.createObjectURL is not a function
I'm tring to create upload images by using Fengyuanchen Cropper Library
But I'm facing as below errors.It simply can not read or find that file but it is existing in console.
// Import image
...
0
votes
0answers
16 views
scrollPagination 'is not a function'
I have the file javascript.js
(function($) {
$.fn.scrollPagination = function(options) {
var settings = {
nop : 10, // The number of posts per scroll to be ...
-1
votes
0answers
9 views
Angular2 model-driven form validator pattern
I'm trying to make a form valid only if it matches a certain pattern.
It must match:
123456789
123-456-789
123 458 789
Here is my pattern:
^(\d{3}-\d{3}-\d{3})|(\d{3} \d{3} \d{3})|(\d{...
2
votes
0answers
16 views
Express Routes in a Single .js File
I'm new to Node/Express, and I think this is a simple ask, but I'm not quite if my logic/understanding is sound.
Here's a simplified version of my app structure:
/app
/routes
filter.js
...
0
votes
0answers
15 views
JSON sending array from PHP to Javascript and extract values from array [duplicate]
Problem is that json_encode returns me array from PHP to Javascript. How could I extract values from an array?
I have simple connect.php file:
$questions = $con->prepare("
SELECT Question, ...
-1
votes
0answers
26 views
extra white spaces to variables in JavaScript [on hold]
This kind of writing JavaScript code is something I came up with:
const aThing = 1;
const somethingRelatedToaThing = 2;
const anotherThingRelated = 3;
const ...
0
votes
0answers
12 views
How can I input text from a web page and apply enctyption algorithm written in Javascript to text and output it?
Hello everybody,
First of all, I am building a web page in which a game (which I'll create) will be incorporated, and I'm trying to learn how to take input from a page and apply to that text a ...
-2
votes
0answers
8 views
What is the value of err in catch statement
try{
Block of code
}
catch(err){
Block of code to handle error
}
In the above code what value does err hold?
0
votes
1answer
17 views
How can I compare encryption strings correctly?
I am fairly new to cryptography and nodejs. I have a basic html page with a username and password input boxes. Along with a login button. I am using cryptojs to try and compare encryption strings.
I ...
0
votes
0answers
7 views
Bootstrap Datepicker doesn't return selected dates after changeDate event within Ember.js
I created an Ember.js component called date-picker-multi.js using the Bootstrap Datepicker JavaScript plugin. I am trying to get the dates within both the input fields (from the date range) whenever ...
0
votes
1answer
48 views
Why do my nav bars duplicate?
My website is 1 page full of different section divs. I have 1 nav on the home page and then after scrolling passed that another fixed nav fades in.
Sometimes when I scroll up there is a duplication ...
0
votes
1answer
10 views
Re-directing after sign-in
Background,
So I have an Ruby on Rails + VueJS application. It's an e-commmerce site that requires users to sign into their accounts - before they can checkout and pay. However, the "checkout" button ...
0
votes
1answer
9 views
Building a Chrome extension that can be activated by hotkeys
Which Chrome API allows me to write an extension which can be activated by non-conflicting hotkeys (like Ctrl-Shift-B), or by trackpad gesture (on Mac)?
I'm looking at Chrome extension API and ...
0
votes
0answers
6 views
Freeze first column and row in GridView ASP.NET using JavaScript
I'm trying to freeze the first column and row of the gridview with this JavaScript code, the first row is getting frozen correctly but I still can not make the first row also frozen.
<script type =...
0
votes
0answers
20 views
In Angular, how can I find out how many times an object was selected
I am building a "tinder" like experience. In which the user will swipe right for things they like and left for things they don't. Once they swipe right 4 times, I need to take them to a new page.
I ...
0
votes
0answers
24 views
Does JS have name binding operations? [duplicate]
I'm a newbie to js. Let me illustrate my question with a few examples.
Code 1
var temp = { key: "value" };
var data = ["v1", "v2"];
var result = [];
for (var i in data) {
var newdata = temp; /** ...
0
votes
1answer
10 views
How selecting a value from a script drop-down option using selenium python
I want select option from drop down-down scrip using selenium & python.
The html is as follows:
<select autocomplete="off" class="style_input_item" name="AccountEnable" id="Enable" value="0" ...
-1
votes
2answers
30 views
Positioning issue with relative div-boxes
MY issue is simple.
I have a header-box with 3 divs inside;
A background image (relative)
a overlay; background-color with opacity (relative)
and a text.
The issue is that i can't position my text ...
0
votes
0answers
5 views
Three.js Rotate Camera and Update Controls (Possible Gimbal Lock?)
I am using three.js using the pointerlock controls.I am setting it to change the rotation of the camera when a function is called. However, because of this, the camera then starts to rotate on itself.
...
0
votes
0answers
10 views
Problems with label in d3.js
I have a multiple bar chart with labels, but it doesn´t look good, because the labels are stacked, I put the code in this jsfiddle
The part of the code that I am using is:
state.selectAll("text....
0
votes
0answers
26 views
Javascript - Recursion and promise [on hold]
Hi have this function :
// This function just add `_x` to all key and `_y` to all values
var data = {
glossary: {
title: "example glossary",
GlossDiv: {
title: "S",
...
-1
votes
0answers
11 views
How should I implement the circular dialing effect in D3.js?
I have to implement the dialing effect on the button click in D3.js or any D3.js supported framework or library. How can I do it? Any help will be appreciated. Thank you in advance!
1
vote
1answer
34 views
Appending a checkbox inside a <td> returns [object, Object]
I have a small project working on. When I add items to my array they will display in a table below my fields.
My problem is that when I try to append a checkbox it returns [object, Object].
My HTML:
...
-2
votes
0answers
13 views
jQuery - load() function
i use the function « load() » to reload a part of page (jsp).
But after reloads, Jquery is not initalized ,i can't do the same JQuery/Ajax action again without reloading whole page.
Have you any ...
2
votes
0answers
17 views
Get vue.js 2.0 to work with Laravl 5.3
I'm trying to setup Vue.js 2.0 with Laravel 5.3. I would like to put the <router-view> </router-view> within a main App.vue component. How do I get this to work with Vue 2.0.
This is not ...
-1
votes
0answers
11 views
Finding JS making inline CSS modification
I am working on a Card component and it has a holder with inline CSS properties.
<li class="feed-block" style="top: 0px; position: absolute; left: 32px;">
When I go to the code in my ...
0
votes
1answer
29 views
AngularJS 1 - ng-repeat not re-rendering after array push
I'm trying to make a simpliest chat app in Angular 1.
Controller code:
app.controller('mainCtrl', function ($scope, $rootScope, $routeParams, $location, $http) {
$scope.messages=[{'name':'user','...
0
votes
0answers
12 views
Reveal a navigation component on one route in React
I have an app with navigation at the top (Home, About, Faq). Only on HOME route I need the menu to be hidden and then reveal onscroll. Navigation is built in App.jsx so it appears on every single page....
-1
votes
0answers
18 views
Save data from form/get data person entered
I am attempting to save a text file with basic information from a form at the same location as the HTML. This will mean saving it not on the computer when the file is hosted. Is there an easy way to ...
0
votes
0answers
9 views
how to add a zoom functionality for jquery threesixty
I want to add a zoom functionality to this script like this 360 viewer.But I do not know how to do this.I would be glad if you help me.
Here is threesixty example: http://jsfiddle.net/rpflorence/...
0
votes
0answers
22 views
Closing accordion panels when another opens
I'm working on an accordion panel group. They all open just fine, but I can't figure out how to get them to close upon opening another element.
Here is what I'm working on in terms of code:
<div ...
0
votes
0answers
6 views
Calling drawArrays several times keeping render buffer
I'm trying to make animation like winning solitaire card using WebGL. I wrote the following code to draw multiple cards.
const canvas = document.createElement('canvas');
canvas.width = canvas.height =...
0
votes
0answers
6 views
React router production build: TypeError: path must be absolute or specify root to res.sendFile
I have a very basic single page app I made using react-router. When I run the development express server locally, it works perfectly. However, when I run it on production, or locally run the ...
0
votes
0answers
9 views
Image to HEX canvas max-width messes up with color picking
Target:
I am trying to set up a page where you can upload an image, pick a specific part of the image and get the hex code of this part.
Problem:
I have managed to set it up as shown in the ...
0
votes
1answer
23 views
disable table row in angularjs
I have table with input=text fields, and when some of fields has id 'four' I need to disable this whole row. For this I try to use this function:
$scope.disableIfRowHasFour = function(row){
...
-1
votes
0answers
6 views
How to add lines on svg at run time on web application?
Please help me to solve my problem. I want to add circle and line when I click on SVG.
2
votes
1answer
29 views
nest function into object more cleanly
I successed nested object such as A.
var A = {};
A.dog = function(){
console.log("LOVE HUMAN");
}
A.dog.say = function(){
console.log("Woof woof!!");
}
A.dog.favorite = {};
A....
-2
votes
0answers
18 views
On Click Function
I would like to ask something about Jquery click function.The "Enterbutton" is a button can click to be function. But I failed. Is that I have missed something for the code?
Whole interface for ...
0
votes
0answers
10 views
Unable to get property 'aoPreSearchCols' of undefined or null reference
I am using jQuery DataTables 1.10.9. I want to disable the default search functionality of contains and add my equals. I am trying to add below code:
var oTable = $('.datatable').dataTable();
var ...
0
votes
0answers
6 views
Using Material design mui.css framework with AngularJS dynamic data to display select menu
I have the MUI design framework currently setup within my project.
https://www.muicss.com/docs/v1/angular/dropdowns
I am using the following boilerplate code to display a Material Designed select ...
0
votes
0answers
3 views
Change the peel-hover-detection area on turnjs plugin
I'm using the amazing turnjs plugin to display a book.
Some of the pages has scrolling, which is not a problem when using a mouse.
But on mobile devices scrolling with finger is triggering the peel ...
1
vote
2answers
39 views
how to check if there are same consecutive elements in a string or html
Let's say I have this string
<div id="ch">abcdefg<img /><img />hij</div>
<div id="ad">abc<img />defg<img />hij</div>
strHtml = $('div#ch').html();
...