i have a page on which i want to confirm if the user wants to leave. i have to confirm only when a certain condition is met so i wrote code like this  var back=false; back=//check if user pressed back button window.onbeforeunload = function (e) {...
I am getting the following error  W20141210-18:14:54.394(5.5)? (STDERR)  W20141210-18:14:54.395(5.5)? (STDERR) /Users/removed/.meteor/packages/meteor-tool/.1.0.36.1phxfod++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib...
So I'm trying to create a simple chart using chart.js. The chart  consists of price values for the y-axis and time values for the x-axis. The data is fetched from an API.    The y-axis value are displayed properly, but for the x-values they appea...
i have following iframe in my website     <iframe class="zoid-component-frame zoid-visible" frameborder="0" allowtransparency="true" name="test" title="ppbutton" scrolling="no" allowpaymentrequest=&#...
I have around 250 json files which i want to copy to an array, my project is based on vuejs and webpack  here is my code below  import ch1 from 'assets/json/ar/ch1.json'; import ch2 from 'assets/json/ar/ch2.json'; .... .... import ch1...
I know this is a simple question but I have been playing around with no success.  I have the following code  <a id="mute"><i class="icon-volume"></i></a>   I want to be able to toggle the class .icon-volume to...
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...
How to run a local bat file on a js button click using Chrome browser ?   'window.open('file:///C:/Test/Test.bat' - Opens the bat file contents in a new tab instead of executing the file. It works fine in IE browser. Please suggest how to...
In Javascript, how can one determine the number of formal parameters defined for a function?  Note, this is not the arguments parameter when the function is called, but the number of named arguments the function was defined with.  function zero() {...
How can I convert a string representation of a date to a real javascript date object?  the date has the following format  E MMM dd HH:mm:ss Z yyyy   e.g.  Sat Jun 30 00:00:00 CEST 2012   Thanks in advance  EDIT: My working solution is based on the ac...
I am working on an MVC4 Application  I have a following Menu Items  <ul class="menu left">                 <li>@Html.ActionLink("Home", "Index", new { Controller = "Home" }, new { @class = "active"...
I need to try to estimate the DISK size of a text string (which could be raw text or a Base64 encoded string for an image/audio/etc) in JavaScript. I'm not sure how to estimate this. The only thing when Googling i can find is .length so i thought...
i want to insert a htmlsnippet into another html-element   i tried it this way  the html  <div class="box1">     insert this html element </div> <div class="box2">   into this </div>   the js  var box1 = docume...
I'm using ES6 classes for Angular controllers and I'm running into a slight annoyance with dependency injection. Take this controller, for example (obviously not a real class).  class PersonController {   constructor(MyDependency) {     MyDep...
I have to use a local analytics.js that I serve from my server. I just want to use the local version if necessary - so is there a solution for checking if the call for analytics.js has failed?  I thought about checking it with a global window.onerror...
I am using XSP.partialRefreshPost to trigger a partial refresh from client side Javascript. I would like to be able to do the partial refresh without triggering the validators (which is just a simple attribute on an ordinary input control).  I have f...
I am working with jquery, javascript, php in Ubuntu Platform.  In the page i am sending an ajax request through jquery to php file and getting response text.  This program was running successfully in windows-(wamp) platform and online. But in Ubuntu...
I've been trying to add the highlighting feature to the Firefox DevTools debugger, so it will highlight the element instead of only showing [HTMLAnchorElement] or similar. I know it's possible, since you can set someElement.style.border='...
I would like to know how I can get content from an IFrame cross-domain?  I have no problem getting content from a non-cross-domain iFrame, but when it's located on another domain, JavaScript doesn't allow access....
What is the best way to get the "anything" part after the domain part, using Javascript:  http://www.domain.com/anything http://www.domain.com/#anything http://www.domain.com/any/thing   For http://www.domain.com/#anything I would have to use...
I want to read a symlink, and get the details of the link itself, not the contents of the linked file. How do I do that in Node, in a cross-platform way?  I can detect symlinks easily using lstat, no problem. Once I know the path of the file, and tha...
I see that in the answer of      In Javascript, why write "var QueryStringToHash = function QueryStringToHash (query) { ... }"?   which is doing something like  var foo = function foo(param) {   ... }   in that particular case, why do that in...
It would be nice if the computer's 'wake up' event was propagated to the browser and available in the JavaScript API. Does anyone know if anything like this is implemented?...
I have a simple hidden dismissible bootstrap alert:    <div id="selectedAssets" class="alert alert-info text-center alert-dismissible" role="alert" style="display:none">   <button type="button" class=&...
It's it possible to get React to move an element rather than re-create it when it changes its place in the DOM?  Let's imagine I'm making a 2 pane component and I want to be able to hide/unhide one pane. Let's also imagine the panes t...
I am currently working with Google Drive API and search files.   var test = false;      gapi.client.drive.files.list({       pageSize: x,       q: "starred = test and viewedByMeTime > '2016-06-01T12:00:00-08:00', and not 'testemail...
How to get real image width & height (cross browser) by JavaScript function ?...
I am very new to Angular.  I recently added Angular Material tab in my app project similar to the one below.   <mat-tab-group>   <mat-tab label="First"  class="firstTab"> Content 1 </mat-tab>   <mat-tab label="...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.