I need a particular script to be triggered in Internet Explorer browsers Only! I’ve tried this: Unfortunately this actually stops the script from being loaded. EDIT: For everyone asking why I need this: IE makes scrolling extremely jumpy when using some animations. In order to address this I need to imp…
Tag: javascript
Google charts from MySQL
I have tried for several hours to get MySQL data in a Google charts but I can’t wrap my head around how to make a working page from the examples I’ve come across on the internet. To start fresh I took a example from Google charts and manually filled it with data. This gives me the graph I want to
Prevent PDF auto download by idm using pdf.js
I’m using PDF.Js to embed PDF file for preview, and I removed the script of download and open files from the viewer.js , but when I test the page and PDF file try to show, the Internet Download Manager download it and abort the preview .. after search I found that using object instead of iframe may solv…
why is this chrome.browserAction.setIcon method not working?
I’m looking at the documentation page and I can’t figure out whats wrong in my code: the documentaion says : Note that ‘details.imageData = foo’ is equivalent to ‘details.imageData = {’19’: foo}’ so I’m extremely confused Answer Your code is basically a bi…
document.querySelector multiple data-attributes in one element
I’m trying to find an element with document.querySelector which has multiple data-attributes: I thought about something like this: But it does not work. However, it works well, if I put the second data-attribute in a child-element like: So, is there an option to search for both attributes at once?I̵…
Can I have an onclick event on a imagemap area element?
I would like to put an onclick event on an area element. Here is my setup: I have tried 2 different ways to have an onclick event. Firstly i tried this: I have also tried this: Neither of the above work. Do area elements support the above, or do they only support having a href? Answer Pay attention: Attribute…
Mongoose date field – Set default to date.now + N days
In a mongoose schema such as: On the line for the “end” field the default date should set to +7 days. I can add presave hook and set it there, but wondering if theres a way to do this inline in the default field. Answer You can add 7 days converted to milliseconds to current date like this or even
How do you enable Dropzone options? autoDiscover breaks Dropzone functionality
So, I tried following the solution here: Dropzone image upload options not working 🙁 but, whenever I provide the option: the dropzone goes from displaying the default drag’n’drop look to just text with a “Browse” button. Here is my code (dropzone is included in header): So, the questio…
Javascript selected text highlighting prob
I have a html page with text content. On selecting any text and pressing the highlight button, I can change the style of the selected text to highlight the same. To implement this feature, i have written the following method. This is working fine if you choose a text with no html tag, but when the text has an…
c3 graph in a dark background; how to change axis and tick value color
I have plotted a graph on a dark background but due to the axis-color and tick-value color it is very difficult to read. How do I change to color of the axis, ticks and axis tick value to white? Answer You could use CSS to style the graph, for example To make the axis white, the tick labels yellow, and