I am very new to d3 charts. I have this code that creates donut charts. However, unable to change colors. could some one help ?    <body>     <div id="chart"></div>     <script src="d3.v3.min.js"></script>...
I am trying to use Vue.js in Django templates. One such template is the following:  {% load static %} <!DOCTYPE html> <html>  <head> </head>  <body>     <div id="myApp">         <span>Hello [[ message...
) Is there any way to use "th:block" tag inside "script" tag? something like that:  <script type="text/javascript">     <th:block>         var test = 1;     </th:block> </script>...
I'm building a webapp and ios/android (same app). At first I thought cordova may be a good choice then after reading I thought React-native may be a better choice.  My question is: Will I have to write the same app twice (one in react for web and...
As the title suggested, I'm trying to call the $(document).ready(function() {...}); from another file.  The code snippet is as below:  Source file:  $(document).ready(function () {     alert('document.ready function called!');     // a lo...
I am having an extremely bizarre problem. I have a Backbone collection, and I am using the where method to find models in the collection that match a certain attribute. My problem is the inconsistency of the results.  I have a joinedGoalList which ke...
I have started learning WebDriverJs to test websites using Javascript as scripting language from url https://code.google.com/p/selenium/wiki/WebDriverJs but found some understanding issue at the beginning.   As per that page, I have to save chrome dr...
First of all: what am I trying to do?  I have an application to view images. It uses the canvas element to render the image. You can zoom in, you can zoom out, and you can drag it around. This part works perfectly right now.  But let's say I have...
I am having trouble with dynamically adding nodes on to a d3.js force directed graph and I was wondering if anyone here could shed some light on the subject.  The problem I am having is that I want the tick function to transform all nodes on the grap...
I have an array i stored(parsed it as json) in localstorage.  I got it back into an object, removed some items from it and i need to update the key with the new values in the local storage.  var counter = [0,1,2]; var count = counter[0]; var question...
I am somewhat new to JavaScript and I have a question.  I know you can set variables and "sub-variables". Like:  var msg = "Hello World"; alert(msg);   and also  var msg = {     lipsum: "Lorem Ipsum Dolor Sit Amet" } alert(msg...
I have a jqGrid it has a checkbox in the rows.  I need to be able to change the value depending of if it is being checked or unchecked.  Using this in the $(document).ready block does not work.  I have tried multiple solutions that I have found on th...
Here is my JavaScript:  <script>     //Make sure DOM is ready before mucking around.     $(document).ready(function()     {         console.log('DOM is ready!');         var socket = io.connect('http://localhost:8080');...
Problem: I am using a Vue JS implementation of Dropzone.js and Multer to upload files. The problem I'm seeing is Dropzone making a POST call for each  chunk of data that it has read. After searching Google, I can't find any examples on how to...
I am just learning knockout.js.  After much work, I got this small viewmodel working, but the shouldBeEnabled method of the ViewModel seems pretty clunky.  Is there a better way to bind this?  What I am trying to achieve is that if the first item is...
I want to use Javascript to parse a tweet and return an array containing the people mentioned in that tweet. Twitter usernames all begin with @. Assuming that I already have the string, how can this be done?...
I have been messing around with JavaScript and HTML on my website. I am trying to get it to play a random video from a list I made and when the video ends to refresh the page and play another video. I have been looking at the YouTube embed API but co...
I am using following javascript to record audio and send it to a websocket server:  const recordAudio = () =>     new Promise(async resolve => {          const constraints = {             audio: {                 sampleSize: 16,...
I'm building up a row to insert in a table using jQuery by creating a html string, i.e.  var row = ""; row += "<tr>"; row += "<td>Name</td>"; row += "<td><input value='"+data.name+&...
I have a JSON data from a URL and c am consuming it using jQuery ajax method.  Now as the JSON code below shows I have a DATA array containing objects in my JSON, now if I access FirstName using resp.DATA[0].FirstName, I am able to get it, but now I...
If I have a "Users" table and a "Followings" table ("Followings" has UserId and FollowedId, both refer to users on the "Users" table)  "Followings" is basically when one user "follows" another user  How...
how to map a nested array's values to an object template, which has the same construct? I had tried some ways, but still can't get the goal, anybody can do me a favor? this is the original data, which I got from backend!    const test_array =...
I have a jquery ui dialog with tabs loaded dynamically/JSON with content. Due to the complexity, I can't really post a fiddle or a relevant code (too much code).  What's happening is that when the dialog opens, you can tab through the element...
I have a piece of JS that appends the following to a web form on the click of a button. When the div .remove is clicked the closest new-attribute div is removed. It works fine.  <div class="new-attribute">     <h3>New Attribute<...
I have a project using the latest version of the FacebookSDK and Xcode 10, the project runs OK in devices, but when submitting to the App Store, during during validation the following error occurs:     Found an unexpected Mach-O header code: 0x72613c...
I have a jsfiddle here - http://jsfiddle.net/88em6qq9/ - where I'm trying to add <h1> tags around a selection of the entire line: "Here is some content and here too"  Selecting the entire line and releasing the mouse button goes int...
Is there a way to save to the local filesystem a canvas with loaded images from external websites into it?  If I try with toDataUrl(), it just trhows a Security error. In Firefox I can just save to a file the canvas with the right click, but this is...
I have to json_encode a PHP array to a JavaScript array. Unfortunately the jQuery library I am using will not properly process that array if it contains ints instead of strings.  Most of the time, this will produce proper array containing only string...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.