I'm trying to loop form to check for empty field and then execute and function. I'm currently using something like this below that I found on this website but what is happening that the each loop check 1 field and see 1 that not empty and sti...
I've got YUI set up and working. I've created a custom button and it shows up fine. What I would like that button to do is wrap selected text with my own custom 'span' tags, just like clicking the 'bold' button wraps selected...
I am trying to convert a legacy app from JointJS v2.2.1 to v3.0.2.  I’m hitting an error others have found:     Uncaught Error: dia.ElementView: markup required. (joint.min.js:8)   A helpful person said: “Please note you need to be careful with t...
Is it possible to find elements inside the Shadow DOM with python-selenium?  Example use case:  I have this input with type="date":    <input type="date">     And I'd like to click the date picker button on the right and cho...
Title is pretty self-explanatory.  Here is a jsfiddle with the popover and the highcharts js code. Chart only shows if you move targeted div outside the popover.  <a id="demo" href="#" tabindex="0" class="btn btn-lg btn...
I'm working on a project that approximates the functionality of Firebug's inspector tool. That is, when mousing over elements on the page, I'd like to highlight them (by changing their background color), and when they're clicked, I...
I'm using fabric js to develop a application to draw a line, Rectangle and circle in one canvas.And there is a other function to drag and drop a image on to canvas.  But when i  added drag and drop function to the application other three function...
this is a follow-up to question Validation in a form with tabs using nested ng-forms.  In this JSFiddle http://jsfiddle.net/gaby/LRfrY/4/ we have a form that won't submit unless all it's subforms are $valid. How do make it jump to the first i...
i see in sites like youtube, soundcloud, spotify, that they stream their contents (audio or video) in small chunks.  For example, when i load an audio on soundcloud, the server response an small piece of the complete archive, then, before of consume...
I need to manage a groovy list object in my javascript function. I have a groovy block into a javascript function.  I tried with this:  var obj = ${mediaObjectInstanceList as grails.converters.JSON}[index];   and this:  var obj = ${mediaObjectInstanc...
Whenever I minify the AdSense script I got from Google, it stops working. Any ideas why?  Original Code:  <script type="text/javascript"><!-- google_ad_client = "xxx"; /* Ad 1 */ google_ad_slot = "2668798369"; google_...
I'am new in javascript. This question is for improve my understanding about javascript. Passing variable maybe easy if page is loaded using get or post or request function. How about passing variable between php and javascript without loading the...
I am playing with the new stuff in JavaScript/ES6. I get an Uncaught ReferenceError: this is not defined(...) player.js:5 in my code. As far as I see, there are no errors here! Is this a bug? Any workarounds?  index.html  <html>     <head&...
When requesting from a server with JavaScript fetch API, you have to do something like  fetch(API)   .then(response => response.json())   .catch(err => console.log(err))   Here, response.json() is resolving its promise.  The thing is that if...
Here is my MongoDB collection schema:  company: String model: String tags: [String]   I need to aggregate it so I get the following output:  [{   "_id": {     "company": "Lenovo",     "model": "T400"   },   ...
I am using leaflet.js and this plugin: https://github.com/stefanocudini/leaflet-search and need a way of getting the lat and long coordinates from the address search and putting them into an input field, or just being able to use them...   The answer...
Is there an easy way to check whether the user scaled the page (using pinch on mobile devices)?  Thought verge.js would help, but I don't know what I can compare viewportH with....
Was wondering how I can reload an iframe every x seconds, perferably not using javascript.   Thanks....
I have an array that contains several arrays and I would like to order the arrays based on a certain string within those arrays.  var myArray = [                 [1, 'alfred', '...'],                 [23, 'berta', '...&#...
I am writing a jQuery plugin. In this plugin I wrap the existing BODY contents in a DIV and hide them.  var $originalBodyContents = $('body').wrapInner('<div>').children('div').hide();   The plugin then appends its own o...
var symbol = prompt("Please choose a symbol"); var side = prompt("Choose the length of the square"); var count1 = 1; var count2 = 1; while (count1 <= side) {     while (count2 <= side) {         document.write(symbol);         v...
I am trying to make a sticky footer for my web page, I found some CSS that does keep the footer at the bottom but has a few downsides. 1, If you keep scrolling down the page the page just gets bigger and bigger (that was completely unexpected, no ide...
I'm getting data from csv files for manage with d3.js. Now I would like get the data without head and insert that by JavaScript code. Example with head:   date,type,brand,model,price 2014-11-27,  electric, tesla, model s , 100000 2014-11-27,  die...
I've always thought that if you want to access the nth character in a string called str, then you have to do something like str.charAt(n). Today I was making a little dummy test page and by mistake, I accessed it with str[n] and to my surprise, i...
i have a search field in which the user enters a letter and the ajax script in the background performs a search. The results are displayed live in a ul-li list. The user can click on the li which class is 'search_list_item'. After the click t...
I've got add  I've got delete  now I need modify   add just adds to the pile haphazardly  delete is able to do it's work with surgical precision because it uses key to find it's culprit :  addInput = (name) => {     const newInputs...
I'm using leaflet and modalcss to display a modal within a map. This worked like a charm with leaflet v0.7.7. See this Plunker: click --> Click the button under the zoom controls.  When I switch to leaflet v1.2.0 the modal gets opened but behi...
I'm not sure I'm doing the right thing, I mutate variable outside of setState, it's fine right? or there's more elegant way to do it?  state = {     persons: [{       name: 'jay',       age: 10     }]   }   addRow = () => {...
I'm using a keypress listener eg..   addEventListener("keypress", function(event){  }   However, this doesn't seem to detect a backspace which erases text...   Is there a different listener I can use to detect this?...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.