I've seen a bunch of similar questions to this get asked before, but I haven't found one that describes my current problem exactly, so here goes:  I have a page which loads a large (between 0.5 and 10 MB) JSON document via AJAX so that the cl...
I have a filtered dom-repeat array in Polymer like this:  <dom-module id="my-element">   <template id="template" is="dom-repeat" items="[[rows]]" filter="filter">     <span on-click="updateIt...
I have one search page where user enters search criteria and search results will be displayed and when the user navigates to another page and comes back to this page the results should be persist.   Each submodule has it's own app.js and controll...
I'm using google picker in my web app to allow user to browse and select files from his google drive. Once he makes the selection, picker returns various data about selected files, including file ID and URL. My goal is to download the selected fi...
I've been programming in Javascript for a while. Recently I made quite a huge jQuery project and applied the Module Pattern as described in this wonderful article: http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth  This all...
I have a simple PHP file which loads a file from my server, base64 encodes it and echoes it out.  Then I have a simple HTML page that uses jQuery to fetch this file, base64 decode it and do a checksum test. The checksum test is not working.  I md5...
I want to fetch images from s3 and display them on my HTML page.  Angular HTML file:  <section data-ng-controller="myCtrl">     <img ng-src="{{src}}" width="200px" height="200px"> </section>   Angular...
I have a generic handler that I call using this very basic js code:       var formData = new FormData();      formData.append("fileId", this.model.get("id"));      xhr = new XMLHttpRequest();      xhr.open('POST', '/generi...
Using the native (ES6) Promise. Should I reject with an Error:  Promise.reject(new Error('Something went wrong'));   Or should I just reject with a string:  Promise.reject('Something went wrong');   And what is the difference in bro...
There is a way to detect from javascript if the google earth plugin is crashed, so I can reload automatically the page without user action? Thanks...
I'm trying to add infoWindow's to multiple markers on a Google Map. The closest I have come is to get an infoWindow to display the last address you can see in the array, on all markers. The bit of code I have pasted below does not work, I get...
How can you set the Content-Type header to "application/x-www-form-urlencoded; charset=UTF-8" using JavaScript?  I need to do this so I can view a form with french characters without generating errors.  Thanks...
I am using Mozilla Firefox and I am trying to figure out a way to access the content of other tabs in the same window using JavaScript and DOM (I am open to other techniques if exist).   E.g. I want to run a JavaScript in tab1 which can find the ti...
I have an interface in TypeScript.  interface Employee{    id: number;    name: string;    salary: number; }   I would like to make 'salary' as a nullable field (Like we can do in C#). Is this possible to do in TypeScript?...
I'm trying to get the weeknumer of a date, but I want it to work with a variable first day of the week. A user is able to set the first day of the week. I couldn't find a javascript solution, so I tried moment. Unfortunately, I couldn't f...
Does anyone know any way that I can use javascript to check when the browser window is close and pop-up a confirmation dailog to ask whether the user is confirm to exit the browser or change his mind to stay?...
I've just started looking at doing some basic mobile web development on the android and an writing a test script to investigate the touch events. I've run the following code in the android emulator, and the touchend event never gets fired. Ca...
I am new to yeoman/grunt/bower and I am working on setting up a angularjs project with:  yo angular   I made some changes to gruntfile myself and recently I found protractor very useful and I wanted to add that to my project. I followed a lot of inst...
i wrote this code to do autocomplete from php array but it is not working, can anybody help?  php array    $cars = array("Volvo", "BMW", "Toyota");     my form    <form id="frm" method="post"> <input i...
I'm learning loops in JavaScript and I'd like to get how to hide all text strings from output.   When alert of skipping was inside @for operator there was no NaN values in output, but it was shown 2 times undesirable alerts, that's why I...
I am trying to create dynamically resized panels with react and foundation. I have tried react-split-pane and other similar libraries, but they are messing with the responsiveness of the page. I also tried the resize css3 property but it is not flexi...
I have this table :   <table>     <thead>         <tr>             <th>Quantity</th>             <th>&nbsp;</th>             <th>Price</th>             <th>Sum</th>         </tr...
I am writing a Selenium test case where one of the steps is to upload a file via Dropzone.js.  (As Selenium can run Javascript in the browser, so if it can be done programmatically in Javascript that would be fine too.)  I want to avoid going all the...
How can I play a sound within a Greasemonkey script?  What I'm trying to do currently is to play a sound whenever a condition is reached, something like:  // ==UserScript== // @name Sound Alert // @namespace example.com // @include example.com/*...
Is there any way prevent angular from auto trim for fields in the whole application? I know that I can prevent it for specified field using ngTrim directive, but it doesn't look good add this directive to all text fields in the application, is th...
I'm trying to send a PUT request on the unload event, however the request is always cancelled.  Answers here says it's not possible:How to perform an ajax call on page unload?  Answers here suggests it's possible:How do I send an AJAX req...
So I currently have one date, but I want multiple and for them to have unique id's.  I can currently use <div id="countdown"></div> to put it in my html, but I want to do something like id="countdown1", id="countdo...
I would suspect this to work at first:  if ($('#element') == $('#element')) alert('hello');   But it does not.  How does one test if elements are the same?...
I have Google Translate on my page. It looks like a drop-down list, but all other drop-down lists on my page have another style. So I created jQuery function which change Google Translator drop down list styles. This function adds or deletes some sty...
I have problem calling a JavaScript function in an iframe from the parent page. Here is my two pages:  mainPage.html  <html> <head>     <title>MainPage</title>     <script type="text/javascript">         functi...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.