id stringlengths 7 11 | source stringclasses 1
value | category stringclasses 11
values | title stringlengths 15 214 | text stringlengths 70 30.5k | url stringlengths 57 160 | tags stringlengths 3 113 | created_at int64 1.22B 1.79B |
|---|---|---|---|---|---|---|---|
se_49995637 | stackoverflow | FRONTEND_DEVELOPMENT | SequelizeForeignKeyConstraintError on nested findOrCreate inside a loop | SequelizeForeignKeyConstraintError on nested findOrCreate inside a loop
I am trying to insert multiple rows on 2 related tables using sequelize with mysql.
Based on sequelize transaction cannot insert because of foreign key? I tried to create a transaction and it seems to work if I execute the promise only once, but ... | https://stackoverflow.com/questions/49995637/sequelizeforeignkeyconstrainterror-on-nested-findorcreate-inside-a-loop | javascript, node.js, promise, sequelize.js | 1,524,554,539 |
se_62690093 | stackoverflow | FRONTEND_DEVELOPMENT | How to use jest to test a function's return value(array)? | How to use jest to test a function's return value(array)?
Here is my function to recursively loop through a object:
const helper = (obj,list) =>{
for (var property in obj){
if(obj.hasOwnProperty(property)) {
if(typeof obj[property] == "object") {
helper(obj[property],l... | https://stackoverflow.com/questions/62690093/how-to-use-jest-to-test-a-functions-return-valuearray | javascript, node.js, testing, jestjs | 1,593,670,527 |
se_5695380 | stackoverflow | FRONTEND_DEVELOPMENT | Reload page after submit in iframe (javascript/jquery) | Reload page after submit in iframe (javascript/jquery)
I have a page with an iframe. In the iframe there’s a submit button. When I click the submit button I want the parent window to be updated.
This is what I have done so far, and it works (the javascript is located in the parent window):
var myFrame = $('iframe');
... | https://stackoverflow.com/questions/5695380/reload-page-after-submit-in-iframe-javascript-jquery | javascript, jquery, iframe, submit, reload | 1,303,063,697 |
se_73383004 | stackoverflow | FRONTEND_DEVELOPMENT | CKEditor encode script tag code and show it as text - not commenting it | CKEditor encode script tag code and show it as text - not commenting it
I use CKEditor and I want to add a script tag snippet:
<script>alert();></script>
The problem is that ckeditor is commenting this code so it doesn't appear in the editor.
What I want is let ckeditor consider this code as text not as code so it ap... | https://stackoverflow.com/questions/73383004/ckeditor-encode-script-tag-code-and-show-it-as-text-not-commenting-it | javascript, html, ckeditor, ckeditor4.x | 1,660,711,903 |
se_50824181 | stackoverflow | FRONTEND_DEVELOPMENT | Preloading Google Fonts | Preloading Google Fonts
Light House audit is suggesting that I preload key requests, specifically the two google fonts that I'm using in my React app. A Light House member suggested using:
<link rel="preload" as="style" href="https://fonts.googleapis.com/css?family=Open+Sans|Roboto:700" crossorigin>
<link rel="precon... | https://stackoverflow.com/questions/50824181/preloading-google-fonts | javascript, html, css, reactjs, lighthouse | 1,528,830,433 |
se_50464777 | stackoverflow | FRONTEND_DEVELOPMENT | Testing functions with arguments in React with Jest Enzyme | Testing functions with arguments in React with Jest Enzyme
I have a function named toggleFilter() in a react component which looks like this:
toggleFilter = (filterType, filterName) => {
const filterApplied = this.state.appliedFilterList[filterType].includes(filterName);
if (filterApplied) {
... | https://stackoverflow.com/questions/50464777/testing-functions-with-arguments-in-react-with-jest-enzyme | javascript, reactjs, tdd, jestjs, enzyme | 1,526,982,937 |
se_73482103 | stackoverflow | FRONTEND_DEVELOPMENT | How do I customize the scrollbar in a Swiper JS slider? | How do I customize the scrollbar in a Swiper JS slider?
I'm trying to create a slider with a scrollbar similar to something like this:
Has a sort of toggle (the red circle) that, much like the progress bar on youtube or any online video, can be dragged to progress further along the slider. I've found tutorials
on how... | https://stackoverflow.com/questions/73482103/how-do-i-customize-the-scrollbar-in-a-swiper-js-slider | javascript, slider, swiper.js | 1,661,403,950 |
se_79991124 | stackoverflow | FRONTEND_DEVELOPMENT | How to delete from a sorted array without O(n) | How to delete from a sorted array without O(n)
I have a sorted array, how do I avoid O(n) when deleting elements.
If removal is O(n), it breaks the point of binary search in the data structure.
Any idea how to traverse without indexes? In any sort of a traversal map you'll just end up with holes | https://stackoverflow.com/questions/79991124/how-to-delete-from-a-sorted-array-without-on | advice, javascript, arrays, optimization | 1,786,045,404 |
se_26416334 | stackoverflow | FRONTEND_DEVELOPMENT | React Error: Target Container is not a DOM Element | React Error: Target Container is not a DOM Element
I just got started using React, so this is probably a very simple mistake, but here we go. My html code is very simple:
<!-- base.html -->
<html>
<head>
<title>Note Cards</title>
<script src="http://<url>/react-0.11.2.js"></script>
<!-- <script src="http... | https://stackoverflow.com/questions/26416334/react-error-target-container-is-not-a-dom-element | javascript, django, dom, reactjs | 1,413,507,791 |
se_9537409 | stackoverflow | FRONTEND_DEVELOPMENT | Javascript Validate on input change, only submit when Submit button clicked | Javascript Validate on input change, only submit when Submit button clicked
I have a form on my site. When the submit button is clicked, a function runs to get the contents of each field, validate the contents based on RegEx and other requirements, and then if everything looks fine, the form is submitted via Ajax to a... | https://stackoverflow.com/questions/9537409/javascript-validate-on-input-change-only-submit-when-submit-button-clicked | javascript, ajax, jquery-validate, validation | 1,330,708,062 |
se_79991429 | stackoverflow | FRONTEND_DEVELOPMENT | Why does my async function return a pending Promise instead of the resolved value when I call it inside a forEach loop | Why does my async function return a pending Promise instead of the resolved value when I call it inside a forEach loop
I am trying to fetch data for a list of user IDs using forEach but the function returns before any of the async calls finish.
async function getUsers(ids) {
let results = []
ids.forEach(async (id)... | https://stackoverflow.com/questions/79991429/why-does-my-async-function-return-a-pending-promise-instead-of-the-resolved-valu | javascript, asynchronous, promise, es6-promise | 1,786,134,683 |
se_35144327 | stackoverflow | FRONTEND_DEVELOPMENT | How to find npm duplicate packages? | How to find npm duplicate packages?
npm dedupe can flatten the folder structure. However, before doing that. I hope to see a list of duplicate packages, so that I know whether or not to go forward. Is there such a feature? If not, is there some sort of scripts that help me achieve this? | https://stackoverflow.com/questions/35144327/how-to-find-npm-duplicate-packages | javascript, node.js, npm | 1,454,382,333 |
se_40668985 | stackoverflow | FRONTEND_DEVELOPMENT | Delete last item in Browser History | Delete last item in Browser History
When a form is submitted to a URL, the browser registers the page again in the history. Suppose, I'm in Page X and I go to Page Y and submit the form. Now, when I press back button of the browser, it again loads the same Page ie. Page Y instead of going to Page X.
So, this form subm... | https://stackoverflow.com/questions/40668985/delete-last-item-in-browser-history | javascript, browser, form-submit, browser-history | 1,479,440,478 |
se_60580466 | stackoverflow | FRONTEND_DEVELOPMENT | Variable value is undefined in Javascript | Variable value is undefined in Javascript
I am trying to get the user location by using HTML5 geolocation. The lat and lng value are received successfully and I can show it on the map. I want to save the user location to use it later so I defined origin variable and I concatenated the lat and lng variables and then I ... | https://stackoverflow.com/questions/60580466/variable-value-is-undefined-in-javascript | javascript, asynccallback | 1,583,603,005 |
se_3639297 | stackoverflow | FRONTEND_DEVELOPMENT | How to approximate Java's Character.isLetterOrDigit() to identify non-English letters, digits in Javascript? | How to approximate Java's Character.isLetterOrDigit() to identify non-English letters, digits in Javascript?
In Javascript, is there a way (that survives internationalization) to determine whether a character is a letter or digit? That will correctly identify Ä, ç as letters, and non-English digits (which I am not... | https://stackoverflow.com/questions/3639297/how-to-approximate-javas-character-isletterordigit-to-identify-non-english-le | javascript, regex, internationalization, number-systems | 1,283,544,867 |
se_79991337 | stackoverflow | FRONTEND_DEVELOPMENT | Why something executes before something else? | Why something executes before something else?
I've been struggling to understand why line marked 2 executes before the function in line marked 1 returns a value:
// this gets called when we press the add button
function addNewItemButton() {
// get info and construct
let date = getCurrentTime();
let isE = d... | https://stackoverflow.com/questions/79991337/why-something-executes-before-something-else | javascript, async-await | 1,786,106,393 |
se_79990584 | stackoverflow | FRONTEND_DEVELOPMENT | Javascript generator only running through one array | Javascript generator only running through one array
I'm making a website about the Artemis Program, three of the pages talk About Artemis I, II, and III. I have created a JavaScript Array for each mission to display a random fact. However, only randomArtemisIFact is running while the other two are not.
// Generates ra... | https://stackoverflow.com/questions/79990584/javascript-generator-only-running-through-one-array | javascript, arrays, random, text | 1,785,909,237 |
se_79982354 | stackoverflow | FRONTEND_DEVELOPMENT | How do you load the google recaptcha scripts after the user accepted the cookies pop-up? | How do you load the google recaptcha scripts after the user accepted the cookies pop-up?
How do you load the JavaScript files from Google's reCaptcha v2 box(gstatic/google) after the user has accepted the cookie pop-up?
Is it possible to hide the reCaptcha with css (display:none), and after accepted the cookies show t... | https://stackoverflow.com/questions/79982354/how-do-you-load-the-google-recaptcha-scripts-after-the-user-accepted-the-cookies | tooling-recommendation, javascript, recaptcha, netlify, hugo | 1,784,581,136 |
se_49409621 | stackoverflow | FRONTEND_DEVELOPMENT | Bootstrap modal not working on iPhone | Bootstrap modal not working on iPhone
This is the modal:
<div class="modal fade" id="modalInsertAgression" tabindex="-1" role="dialog" aria-labelledby="modalInsertAgression" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="card">
<form id="formInsertarAgresion" action="{% url 'i... | https://stackoverflow.com/questions/49409621/bootstrap-modal-not-working-on-iphone | javascript, jquery, html, iphone | 1,521,644,135 |
se_48944709 | stackoverflow | FRONTEND_DEVELOPMENT | Angular addEventListener with options | Angular addEventListener with options
How to use addEventListener function with options with Angular 5? If there is document, could you please point me to it? Thanks
target.addEventListener(type, listener[, options]);
target.addEventListener(type, listener[, useCapture]);
Angular way of listening to event method do... | https://stackoverflow.com/questions/48944709/angular-addeventlistener-with-options | javascript, angular, addeventlistener | 1,519,378,026 |
se_8131700 | stackoverflow | FRONTEND_DEVELOPMENT | How can I control the expansion direction of a drop-down list? | How can I control the expansion direction of a drop-down list?
How can I control the expansion direction of a drop-down list? I've got a long list on the right side of the page that goes off the page because it expands right. Can I make it expand to the left? | https://stackoverflow.com/questions/8131700/how-can-i-control-the-expansion-direction-of-a-drop-down-list | javascript, html, css, drop-down-menu | 1,321,333,264 |
se_73253794 | stackoverflow | FRONTEND_DEVELOPMENT | Finding the smallest positive missing integer in an array | Finding the smallest positive missing integer in an array
I am aware that this exact problem has been asked around before. The purpose of my question is to figure out why my specific solution is not working. Codility does not allow us to see the full test cases they use, and apparently my code is failing some of the t... | https://stackoverflow.com/questions/73253794/finding-the-smallest-positive-missing-integer-in-an-array | javascript, arrays | 1,659,723,130 |
se_79991081 | stackoverflow | FRONTEND_DEVELOPMENT | How to test PlateJs Marks with React Testing Library | How to test PlateJs Marks with React Testing Library
I can't seem to be able to make this work.
My Editor:
const editor = usePlateEditor({
plugins: [...BasicMarksKit, PlainTextPastePlugin],
value: initialValue,
});
<Plate editor={editor} onValueChange={saveContent}>
<RichTextControls />
<EditorContainer onKey... | https://stackoverflow.com/questions/79991081/how-to-test-platejs-marks-with-react-testing-library | javascript, reactjs, jestjs, react-testing-library, slate.js | 1,786,033,029 |
se_79990317 | stackoverflow | FRONTEND_DEVELOPMENT | Classic scrollbar width getters not working on Firefox | Classic scrollbar width getters not working on Firefox
I have this function:
function getScrollbarWidth() {
// Creating invisible container
const outer = document.createElement("div");
outer.style.visibility = "hidden";
outer.style.overflow = "scroll"; // forcing scrollbar to appear
document.body... | https://stackoverflow.com/questions/79990317/classic-scrollbar-width-getters-not-working-on-firefox | javascript, css, firefox | 1,785,831,882 |
se_65134661 | stackoverflow | FRONTEND_DEVELOPMENT | NextJs useEffect triggers every time I route | NextJs useEffect triggers every time I route
I am building a nextjs blog app.
In the current blog layout, I managed to fetch data on my sidebar (I need it to show my "recent posts" there) using the useEffect/fetch (because getInitialProps works only under Pages) but it triggers whenever I route between pages. (it goes... | https://stackoverflow.com/questions/65134661/nextjs-useeffect-triggers-every-time-i-route | javascript, reactjs, next.js | 1,607,032,081 |
se_1063813 | stackoverflow | FRONTEND_DEVELOPMENT | Listener for property value changes in a Javascript object | Listener for property value changes in a Javascript object
Going through MDN's Javascript documentation, I found the following two functions defined on Object.prototype which look interesting:
.watch - Watches for a property to be assigned a value and then runs a function when that occurs.
.unwatch - Removes a watchpo... | https://stackoverflow.com/questions/1063813/listener-for-property-value-changes-in-a-javascript-object | javascript, browser, dom-events | 1,246,370,033 |
se_79991196 | stackoverflow | FRONTEND_DEVELOPMENT | Fixing a GNOME Shell St.ScrollView 1px layout collapse under unconstrained sizing queries | Fixing a GNOME Shell St.ScrollView 1px layout collapse under unconstrained sizing queries
When developing a custom GNOME Shell extension or UI component in GJS (JavaScript), a custom grid widget inside an St.ScrollView within a vertical St.BoxLayout collapses to a height of 1px and becomes invisible on screen.
Inspect... | https://stackoverflow.com/questions/79991196/fixing-a-gnome-shell-st-scrollview-1px-layout-collapse-under-unconstrained-sizin | javascript, gnome-shell, gjs, clutter | 1,786,072,822 |
se_50118647 | stackoverflow | FRONTEND_DEVELOPMENT | Convert XML to Base64 using Javascript | Convert XML to Base64 using Javascript
In my code I have converted data from a JSON Model into XML. To ensure correct formatting I parse my created XML string into XML Doc. (API cannot work with XML that is not well formatted)
Therefore, I need some help converting my XML Doc variable into Base64 (instead of my XML s... | https://stackoverflow.com/questions/50118647/convert-xml-to-base64-using-javascript | javascript, xml, base64, data-conversion | 1,525,186,159 |
se_68743573 | stackoverflow | FRONTEND_DEVELOPMENT | Does g_form.onUserChangeValue work with unchecking checkbox? | Does g_form.onUserChangeValue work with unchecking checkbox?
I have a form that needs to do an AJAX call on any field change. I thought this was a good use case for onUserChangeValue
var handler = function(fieldname, originalValue, newValue) {
console.log('The field ('+ fieldname + ') has a new value of: ' + n... | https://stackoverflow.com/questions/68743573/does-g-form-onuserchangevalue-work-with-unchecking-checkbox | javascript, servicenow | 1,628,690,641 |
se_63185684 | stackoverflow | FRONTEND_DEVELOPMENT | What are the events that the <img/> element triggers when the image is added? | What are the events that the <img/> element triggers when the image is added?
I'm dynamically adding content to HTML where there are images. By design I don't know the actual image data on the time of adding the content, but I'm retrieving this data using JS. I need an event that triggers the function that retri... | https://stackoverflow.com/questions/63185684/what-are-the-events-that-the-img-element-triggers-when-the-image-is-added | javascript, html, image, events | 1,596,168,737 |
se_73457996 | stackoverflow | FRONTEND_DEVELOPMENT | How do you get the user data from a HTML input (text) created using createElement()? | How do you get the user data from a HTML input (text) created using createElement()?
My Problem
I would like some help understanding how to access the value inside input1 and input2, store them in a variable so I can later use them with a function that will calculate the two values and display it in the result div.
co... | https://stackoverflow.com/questions/73457996/how-do-you-get-the-user-data-from-a-html-input-text-created-using-createelemen | javascript | 1,661,254,575 |
se_62436868 | stackoverflow | FRONTEND_DEVELOPMENT | Cannot find module: internal/modules/cjs/loader.js:969 | Cannot find module: internal/modules/cjs/loader.js:969
I wanted to run my app and I suddenly got this error. Why?
this is what my order looks like in which i work.
./
├─ app.js
├─ .env
├─ .gitignore
├─ node modules/
│ └─ ...
├─ package.json
├─ package-lock.json
├─ models/
│ └─ advertiser/
│ └─ advertiser_info.js... | https://stackoverflow.com/questions/62436868/cannot-find-module-internal-modules-cjs-loader-js969 | javascript, node.js, express, sequelize.js, node-modules | 1,592,421,889 |
se_36054666 | stackoverflow | FRONTEND_DEVELOPMENT | Use AJAX to fetch database rows for an id in CodeIgniter | Use AJAX to fetch database rows for an id in CodeIgniter
I am fetching the sub_regions name on the basis of region_id with AJAX in my CodeIgniter 3 app. I'm joining the region and sub_region table and I am getting results in the Network tab of my browser console. That means the query and everything else is working wel... | https://stackoverflow.com/questions/36054666/use-ajax-to-fetch-database-rows-for-an-id-in-codeigniter | javascript, php, ajax, codeigniter, model-view-controller | 1,458,201,774 |
se_32775089 | stackoverflow | FRONTEND_DEVELOPMENT | Error: Channel ended, no reply will be forthcoming | Error: Channel ended, no reply will be forthcoming
i'm trying to use wascally (npm) inside a meteor application and i've got it set up and running. however, i'm trying to use the request() function and chain then() statements on to it to deal with a response.
i'm getting an error that i can't seem to figure out beca... | https://stackoverflow.com/questions/32775089/error-channel-ended-no-reply-will-be-forthcoming | javascript, node.js, meteor, rabbitmq | 1,443,157,091 |
se_53523180 | stackoverflow | FRONTEND_DEVELOPMENT | How can I add margins to a jsPDF document? | How can I add margins to a jsPDF document?
I creating a document through jsPDF without using the function "doc.fromHTML". I can define left margin for every text but I cannot do it for margin right so when the text is too large it take more width than the page. This is a snippet of my code. So basically I want to add ... | https://stackoverflow.com/questions/53523180/how-can-i-add-margins-to-a-jspdf-document | javascript, jquery, jspdf | 1,543,419,827 |
se_6121203 | stackoverflow | FRONTEND_DEVELOPMENT | How to do fade-in and fade-out with JavaScript and CSS | How to do fade-in and fade-out with JavaScript and CSS
I want to make an HTML div tag fade in and fade out.
I have some code that fades out, but when I fade in, the opacity of the div stays at 0.1 and doesn't increase.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1... | https://stackoverflow.com/questions/6121203/how-to-do-fade-in-and-fade-out-with-javascript-and-css | javascript, css, xhtml | 1,306,309,875 |
se_7738117 | stackoverflow | FRONTEND_DEVELOPMENT | HTML text-overflow ellipsis detection | HTML text-overflow ellipsis detection
I have some elements on my page which have the CSS rules white-space, overflow, text-overflow set, so that overflowing text is trimmed and an ellipsis is used.
div {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
border: 1px solid black;
width: 150p... | https://stackoverflow.com/questions/7738117/html-text-overflow-ellipsis-detection | javascript, html, css, overflow, ellipsis | 1,318,412,606 |
se_70851699 | stackoverflow | FRONTEND_DEVELOPMENT | How do i import OrbitControls in three.js | How do i import OrbitControls in three.js
I tried to import OrbitControls but it isnt working.
I imported three.js and then tried impoting OrbitControls but it isnt working
I imported three.js in the body of the html with this command
script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/104/three.js"
NOTE: I do... | https://stackoverflow.com/questions/70851699/how-do-i-import-orbitcontrols-in-three-js | javascript, three.js | 1,643,125,946 |
se_72570497 | stackoverflow | FRONTEND_DEVELOPMENT | Why am I getting the 'SyntaxError: Cannot use import statement outside a module' error while using the cloudinary module? | Why am I getting the 'SyntaxError: Cannot use import statement outside a module' error while using the cloudinary module?
I am trying to call the cloudinary module to resize an image. This is my code:
import cloudinary from 'cloudinary';
var cl = new cloudinary.Cloudinary({ cloud_name: "username", secure: true... | https://stackoverflow.com/questions/72570497/why-am-i-getting-the-syntaxerror-cannot-use-import-statement-outside-a-module | javascript, node.js, npm, module, cloudinary | 1,654,845,775 |
se_45388147 | stackoverflow | FRONTEND_DEVELOPMENT | Calling .play() creates "Uncaught (in promise) DOMException: The element has no supported sources." error | Calling .play() creates "Uncaught (in promise) DOMException: The element has no supported sources." error
I'm trying to follow Wes Bos's Javascript30 tutorials, but when I tried making the "Javascript Drum Kit" site, I couldn't get any sound to play. The appropriate sound files are there, but when I press th... | https://stackoverflow.com/questions/45388147/calling-play-creates-uncaught-in-promise-domexception-the-element-has-no | javascript, audio | 1,501,323,980 |
se_19746613 | stackoverflow | FRONTEND_DEVELOPMENT | Variable equals to variable true | Variable equals to variable true
I can't really describe it word by word so I will use an example:
function f1() {
document.write(vavariable)
};
function f2(){
if(variablefot)
document.body.style.color='red';
};
variablefot = false;
variablefotok = variablefot = true;
variable1 = 'text1' +variablefotok;
var... | https://stackoverflow.com/questions/19746613/variable-equals-to-variable-true | javascript, variables, variable-assignment | 1,383,424,692 |
se_21587823 | stackoverflow | FRONTEND_DEVELOPMENT | Destroying ScriptUI palette windows (and more) | Destroying ScriptUI palette windows (and more)
In ExtendScript, I've run up against a very strange scenario with which I need some help from a ScriptUI guru. I've got a huge InDesign script that, during the course of its execution, displays a progress bar in a palette window. (var w = new Window("palette", "Progress"... | https://stackoverflow.com/questions/21587823/destroying-scriptui-palette-windows-and-more | javascript, window, adobe-indesign, extendscript, adobe-scriptui | 1,391,632,176 |
se_10015027 | stackoverflow | FRONTEND_DEVELOPMENT | toFixed is not rounding in JavaScript | toFixed is not rounding in JavaScript
I'm using JavaScript to bind to some checkboxes, and the toFixed(2) is not rounding up. Why is it not rounding?
For instance, if the number is 859.385, it's only displaying 859.38, instead of 859.39.
I've also read that the toFixed can round differently depending on which browser ... | https://stackoverflow.com/questions/10015027/tofixed-is-not-rounding-in-javascript | javascript | 1,333,555,604 |
se_79989578 | stackoverflow | FRONTEND_DEVELOPMENT | How to test Vue ripple directive has been used? | How to test Vue ripple directive has been used?
My Vue App uses Quasar plugin. Quasar includes ripple directive, which my component uses.
How can I test v-ripple has been used?
<template>
<q-item v-ripple>...</q-item>
</template>
I've been trying this way but it does not work.
import { mount } from '@vue/test-utils... | https://stackoverflow.com/questions/79989578/how-to-test-vue-ripple-directive-has-been-used | javascript, vue.js, quasar, vue-test-utils, vue-directives | 1,785,529,056 |
se_79984216 | stackoverflow | FRONTEND_DEVELOPMENT | Content Security Policy (CSP) "unsafe-hashes" does not work as expected. Browser expecting different hash | Content Security Policy (CSP) "unsafe-hashes" does not work as expected. Browser expecting different hash
Consider the following single HTML file:
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-hashes' 'sha256-5OdtjsKuRneco+QGmtdJ48OzQ4ZYG8JnWV+4T/1zhxg='">
... | https://stackoverflow.com/questions/79984216/content-security-policy-csp-unsafe-hashes-does-not-work-as-expected-browser | javascript, html, web, content-security-policy | 1,784,812,781 |
se_34979051 | stackoverflow | FRONTEND_DEVELOPMENT | Find next instance of a given weekday (ie. Monday) with moment.js | Find next instance of a given weekday (ie. Monday) with moment.js
I want to get the date of the next Monday or Thursday (or today if it is Mon or Thurs). As Moment.js works within the bounds of a Sunday - Saturday, I'm having to work out the current day and calculate the next Monday or Thursday based on that:
if (mom... | https://stackoverflow.com/questions/34979051/find-next-instance-of-a-given-weekday-ie-monday-with-moment-js | javascript, momentjs | 1,453,656,699 |
se_72070748 | stackoverflow | FRONTEND_DEVELOPMENT | Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html" | Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html"
I deployed my angular application(Static webpage) on kubernetes and tried launching it from Google Chrome. I see app is loading, however there is nothing displayed on the browser. Upon c... | https://stackoverflow.com/questions/72070748/failed-to-load-module-script-expected-a-javascript-module-script-but-the-server | javascript, angular, google-chrome, kubernetes, mime-types | 1,651,340,343 |
se_1685680 | stackoverflow | FRONTEND_DEVELOPMENT | How can I avoid scientific notation for large numbers in JavaScript? | How can I avoid scientific notation for large numbers in JavaScript?
JavaScript converts integers with more than 21 digits to scientific notation when used in a string context. I'm printing an integer as part of a URL. How can I prevent the conversion from happening? | https://stackoverflow.com/questions/1685680/how-can-i-avoid-scientific-notation-for-large-numbers-in-javascript | javascript | 1,257,486,841 |
se_11832914 | stackoverflow | FRONTEND_DEVELOPMENT | How to round to at most 2 decimal places, if necessary | How to round to at most 2 decimal places, if necessary
I'd like to round at most two decimal places, but only if necessary.
Input:
10
1.7777777
9.1
Output:
10
1.78
9.1
How can I do this in JavaScript? | https://stackoverflow.com/questions/11832914/how-to-round-to-at-most-2-decimal-places-if-necessary | javascript, rounding, decimal-point | 1,344,273,468 |
se_7060916 | stackoverflow | FRONTEND_DEVELOPMENT | Can a switch case test if a value meets a complex condition instead of just equality comparison? | Can a switch case test if a value meets a complex condition instead of just equality comparison?
How can I do something like this with a switch statement:
String.prototype.startsWith = function( str ){
return ( this.indexOf( str ) === 0 );
}
switch( myVar ) {
case myVar.startsWith( 'product' ):
// do... | https://stackoverflow.com/questions/7060916/can-a-switch-case-test-if-a-value-meets-a-complex-condition-instead-of-just-equa | javascript, switch-statement | 1,313,371,133 |
se_47363597 | stackoverflow | FRONTEND_DEVELOPMENT | How to turn this sequence of if statements into a switch statement? | How to turn this sequence of if statements into a switch statement?
I'm trying to learn how to do a switch statement using javascript. Can you guys help me how to convert this one into switch statement?
if (x == ix && y == iy){//should be the default
x.style.backgroundColor = 'white';
}
if(x < ix){
x.style.b... | https://stackoverflow.com/questions/47363597/how-to-turn-this-sequence-of-if-statements-into-a-switch-statement | javascript, switch-statement | 1,510,989,444 |
se_2765981 | stackoverflow | FRONTEND_DEVELOPMENT | javascript switch(true) | javascript switch(true)
Hi i am trying to handle an ajax json response
here is my code
success: function (j) {
switch(true)
{
case (j.choice1):
alert("choice2");
break;
case (j.choice2):
alert("choice2");
break;
default:
al... | https://stackoverflow.com/questions/2765981/javascript-switchtrue | javascript | 1,272,982,081 |
se_79990871 | stackoverflow | FRONTEND_DEVELOPMENT | I want to filter the class but got error .filter is not a function | I want to filter the class but got error .filter is not a function
I got a div in JavaScript, which has two classes one for category (specific for each) and one for CSS styling. I got that div correct div in .closest method but I want to fetch its category class which is any one of these:
Nature or Trivia or Sports or... | https://stackoverflow.com/questions/79990871/i-want-to-filter-the-class-but-got-error-filter-is-not-a-function | javascript, html | 1,785,987,724 |
se_64603999 | stackoverflow | FRONTEND_DEVELOPMENT | Tailwind with ternary operator - Active vs Inactive class | Tailwind with ternary operator - Active vs Inactive class
I am working on a project with React and using Tailwind as my CSS.
I have got a Sidebar that should really not be present in the landing page when user lands only when clicking burger menu. At the moment this is present when user lands and it's looking slightly... | https://stackoverflow.com/questions/64603999/tailwind-with-ternary-operator-active-vs-inactive-class | javascript | 1,604,041,684 |
se_39309064 | stackoverflow | FRONTEND_DEVELOPMENT | What is the proper way of using JavaScript, jQuery and AJAX to avoid reaching CPU limits? | What is the proper way of using JavaScript, jQuery and AJAX to avoid reaching CPU limits?
Maybe I think this script below is causing me High server load make my site down as well as CPU reach limit. Is there a proper way to code the variables and arrangement of this script?
One point here also, I am using here a SetT... | https://stackoverflow.com/questions/39309064/what-is-the-proper-way-of-using-javascript-jquery-and-ajax-to-avoid-reaching-cp | best-practices, javascript, php, jquery, codeigniter | 1,472,920,273 |
se_33957477 | stackoverflow | FRONTEND_DEVELOPMENT | cross domain localstorage with javascript | cross domain localstorage with javascript
We have a javascript api.js which is hosted on domain api.abc.com. It manages the local storage.
We included this javascript in our websites at abc.com and login.abc.com as a cross domain js like
<script src="http://api.abc.com/api.js">
I understand that localstoarge is p... | https://stackoverflow.com/questions/33957477/cross-domain-localstorage-with-javascript | javascript, local-storage, cross-domain | 1,448,627,419 |
se_38231065 | stackoverflow | FRONTEND_DEVELOPMENT | How to make nested views on multiple views in angular ui router? | How to make nested views on multiple views in angular ui router?
My app is very simple. i have a home page that contains header and body. in body section I want to show login page and if URL changed to 'password/forget' I show password reset form. my templates:
index.html :
<header ui-view="header">
</header>
<div cla... | https://stackoverflow.com/questions/38231065/how-to-make-nested-views-on-multiple-views-in-angular-ui-router | javascript, html, angularjs, angular-ui-router, nested-views | 1,467,829,227 |
se_11049079 | stackoverflow | FRONTEND_DEVELOPMENT | Set the focus on input element after submit | Set the focus on input element after submit
I have a form with some input fields. I am using the tabStrip KendoUI widget to group the input fields. I am using the Kendo validator and when the form is submitted some error messages are triggered. The problem is that if the input field with the error message is on a diff... | https://stackoverflow.com/questions/11049079/set-the-focus-on-input-element-after-submit | javascript, jquery, kendo-ui | 1,339,756,563 |
se_35270796 | stackoverflow | FRONTEND_DEVELOPMENT | While resize browser window counter variable value should be incremented by 1 value | While resize browser window counter variable value should be incremented by 1 value
I am facing a problem whenever I resize the browser window by pressing (CTRL+SHFT+M) or change the orientation of window. counter_ variable value increment by 4 or 7 instead of 1.
HTML:
<div id="my_element">
<span id="text">0</span... | https://stackoverflow.com/questions/35270796/while-resize-browser-window-counter-variable-value-should-be-incremented-by-1-va | javascript, jquery | 1,454,937,970 |
se_64387940 | stackoverflow | FRONTEND_DEVELOPMENT | react-table: change background color of rows depending upon row props value | react-table: change background color of rows depending upon row props value
I have a situation where I have to change background color of rows depending upon row props. I am currently doing this:
const getTrProps = (state, rowInfo, instance) => {
if (rowInfo) {
return {
style: {
... | https://stackoverflow.com/questions/64387940/react-table-change-background-color-of-rows-depending-upon-row-props-value | javascript, reactjs, react-table, react-table-v6 | 1,602,846,360 |
se_34809486 | stackoverflow | FRONTEND_DEVELOPMENT | Explain use of levels in winston logger | Explain use of levels in winston logger
Hey i am using this winston logger,
kindly explain use of level inside the transports, what will happen if i use logger with info while logging, do i have to use debug while i log my data.
var logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)({
... | https://stackoverflow.com/questions/34809486/explain-use-of-levels-in-winston-logger | javascript, node.js, logging, npm, winston | 1,452,855,299 |
se_35286870 | stackoverflow | FRONTEND_DEVELOPMENT | How to auto-increment serial number of row in html using Javascript | How to auto-increment serial number of row in html using Javascript
I am trying to add rows of tables. I can't add serial number of new added rows.
For example, I have to show serial number automatically incrementing while row is added.
<SCRIPT language="javascript">
function addRow(dataTable) {
var table = docume... | https://stackoverflow.com/questions/35286870/how-to-auto-increment-serial-number-of-row-in-html-using-javascript | javascript, html | 1,455,005,408 |
se_35422267 | stackoverflow | FRONTEND_DEVELOPMENT | Will the id of requestAnimationFrame overflow in Javascript? | Will the id of requestAnimationFrame overflow in Javascript?
In Javascript, when I call setTimeout, setInterval or requestAnimationFrame, it will return an id which later can be used to cancel it.
But the id is continuously incrementing, especially when called frequently like "requestAnimationFrame". I am wondering if... | https://stackoverflow.com/questions/35422267/will-the-id-of-requestanimationframe-overflow-in-javascript | javascript, requestanimationframe | 1,455,587,330 |
se_21985856 | stackoverflow | FRONTEND_DEVELOPMENT | How to send file using javascript | How to send file using javascript
I am trying to make an upload page which takes file to upload. I am using Spring framework here my query is on Upload button I am calling a JavaScript method which should send my file to controller using jQuery AJAX. Is there any way to pass this through JavaScript?
Following is the ... | https://stackoverflow.com/questions/21985856/how-to-send-file-using-javascript | java, javascript, jquery | 1,393,239,758 |
se_19423286 | stackoverflow | FRONTEND_DEVELOPMENT | add new item to sharepoint list in javascript | add new item to sharepoint list in javascript
I want to add a new item to my sharepoint list using javascript. I used the code straight from MSDN but it doesn't work. I think the problem is whith the siteUrl I declare, because when I set alerts like this:
var siteUrl = 'http://units.mil.intra/sites/DGHR/h/default.asp... | https://stackoverflow.com/questions/19423286/add-new-item-to-sharepoint-list-in-javascript | javascript, sharepoint | 1,382,003,194 |
se_322378 | stackoverflow | FRONTEND_DEVELOPMENT | Check if mouse button down in JS on browser | Check if mouse button down in JS on browser
Is there a way to detect if a mouse button is currently down in JavaScript?
I know about the "mousedown" event, but that's not what I need. Some time AFTER the mouse button is pressed, I want to be able to detect if it is still pressed down.
Is this possible? | https://stackoverflow.com/questions/322378/check-if-mouse-button-down-in-js-on-browser | javascript, input, mouse, user-input, input-devices | 1,227,738,563 |
se_60200029 | stackoverflow | FRONTEND_DEVELOPMENT | What's the difference between mouseenter and mouseover, and mouseout and mouseleave? | What's the difference between mouseenter and mouseover, and mouseout and mouseleave?
I'm looking at the MDN documentation and it says:
mouseenter A pointing device is moved onto the element that has the listener attached.
mouseleave A pointing device is moved off the element that has the listener attached.
mou... | https://stackoverflow.com/questions/60200029/whats-the-difference-between-mouseenter-and-mouseover-and-mouseout-and-mousele | javascript, dom, mouseevent | 1,581,564,620 |
se_27663404 | stackoverflow | FRONTEND_DEVELOPMENT | Using $(this).find with .click() jQuery | Using $(this).find with .click() jQuery
On the click of the plus icon I want the check icon to appear for only the one plus icon in that particular div. Not all plus icons throughout the page. Here is the html followed by the jQuery.
<div class="pin">
<img class="brand-logo" src="img/nike.jpg" />
<div... | https://stackoverflow.com/questions/27663404/using-this-find-with-click-jquery | javascript, jquery, click, find, this | 1,419,641,007 |
se_40667654 | stackoverflow | FRONTEND_DEVELOPMENT | Angular JS 2 -- Application Design | Angular JS 2 -- Application Design
I got one main component for the FORM and have three component for sections
Now in the main form i have submit button which i want to use to submit all the section(s) data to a service?
How can i achieve this?
Do i use output event emitter in all the section components and get the... | https://stackoverflow.com/questions/40667654/angular-js-2-application-design | javascript, forms, angular | 1,479,430,193 |
se_56134550 | stackoverflow | FRONTEND_DEVELOPMENT | JavaScript is function static | JavaScript is function static
Is it possible to determine whether a JavaScript function is static? I've written a class to test this but I need to code the isStatic method which should return a boolean showing whether the func passed in is static (return true) or not (return false).
How can I do that?
class MyClass ... | https://stackoverflow.com/questions/56134550/javascript-is-function-static | javascript, static | 1,557,850,113 |
se_37295377 | stackoverflow | FRONTEND_DEVELOPMENT | how to navigate from one page to another in react js? | how to navigate from one page to another in react js?
I have two components. In first component I have one button. On click of button I want to navigate to another component or another page.
here is my code
http://codepen.io/naveennsit/pen/pymqPa?editors=1010
class App extends React.Component {
handleClick(){
... | https://stackoverflow.com/questions/37295377/how-to-navigate-from-one-page-to-another-in-react-js | javascript, reactjs, react-router | 1,463,563,454 |
se_32359230 | stackoverflow | FRONTEND_DEVELOPMENT | Click event on div except for textbox | Click event on div except for textbox
I'm using jQuery Flip to create a flash card game. I have the following:
<div id="card" style="width: 300px;">
<div class="front" style=" height:200px; width:200px; background-color:#d9edf7;">
</div>
<div class="back" style=" height:200px; width:200px; background-colo... | https://stackoverflow.com/questions/32359230/click-event-on-div-except-for-textbox | javascript, jquery | 1,441,213,920 |
se_69646893 | stackoverflow | FRONTEND_DEVELOPMENT | useSWRInfinite - getKey function always gets pageIndex as 1 | useSWRInfinite - getKey function always gets pageIndex as 1
I am using the SWRInfinite example as defined here (https://github.com/vercel/swr/discussions/732) and here (https://swr.vercel.app/examples/infinite-loading).
My code is as below...
import React from 'react'
import {useSelector} from 'react-redux'
import us... | https://stackoverflow.com/questions/69646893/useswrinfinite-getkey-function-always-gets-pageindex-as-1 | javascript, reactjs, swr | 1,634,736,453 |
se_65175535 | stackoverflow | FRONTEND_DEVELOPMENT | Why my datatable Fixed header doesn`t work / | Why my datatable Fixed header doesn`t work /
I am trying to make my data table Thead a sticky one but when i tried fixed header than it doesn't work . I have tried position: fixed; , top: 0; and try to fix it with css but when a done this action than it works in firefox as expected but it doesn't work as expected in ... | https://stackoverflow.com/questions/65175535/why-my-datatable-fixed-header-doesnt-work | javascript, jquery, ajax, datatable | 1,607,310,135 |
se_21582585 | stackoverflow | FRONTEND_DEVELOPMENT | jQuery datepicker when loaded says undefined. | jQuery datepicker when loaded says undefined.
Im trying to implement a date picker in my form however when the code it added the date picker does not display in the brewers. When the console is inspected this error is posted
TypeError: 'undefined' is not a function (evaluating '$( "#datepicker" ).datepicker()')
The jQ... | https://stackoverflow.com/questions/21582585/jquery-datepicker-when-loaded-says-undefined | javascript, jquery, jquery-ui, datepicker | 1,391,617,171 |
se_17339632 | stackoverflow | FRONTEND_DEVELOPMENT | How to open new tab instead of new window in Chrome in java scripts | How to open new tab instead of new window in Chrome in java scripts
Using this below code I am able to open new tab along with the URL..in Firefox..but same code when I am trying to open in Chrome its opening new window which I don't want new window ..I want new tab in case of chrome
Here is my code:
> window.open... | https://stackoverflow.com/questions/17339632/how-to-open-new-tab-instead-of-new-window-in-chrome-in-java-scripts | javascript, cross-browser | 1,372,325,683 |
se_47263864 | stackoverflow | FRONTEND_DEVELOPMENT | How to display error message when extra fields are not filled on registration in WordPress? | How to display error message when extra fields are not filled on registration in WordPress?
I would like to custamize the default user registration in Wordpress by adding first and last name and checkox with terms and coditions. The user is not able to register till all fields are filled and the checkbox is checked. I... | https://stackoverflow.com/questions/47263864/how-to-display-error-message-when-extra-fields-are-not-filled-on-registration-in | javascript, php, wordpress, forms, registration | 1,510,574,309 |
se_56485409 | stackoverflow | FRONTEND_DEVELOPMENT | Is there a way to return React Component as string instead of object? | Is there a way to return React Component as string instead of object?
I want to introduce a multilingual system.
I have a function component that returns a translation of a specific element based on selected language (from Context API).
Everything works well until I put the translated element into the form (option va... | https://stackoverflow.com/questions/56485409/is-there-a-way-to-return-react-component-as-string-instead-of-object | javascript, html, reactjs, forms, placeholder | 1,559,857,063 |
se_72463556 | stackoverflow | FRONTEND_DEVELOPMENT | 'v-model' directives require the attribute value which is valid as LHS | 'v-model' directives require the attribute value which is valid as LHS
I have a Vue application and there is a table where every row has its own id. Then I need to show/hide some elements according condition in v-model directive which compare row id with value in model. The code looks like
<b-loading v-model="... | https://stackoverflow.com/questions/72463556/v-model-directives-require-the-attribute-value-which-is-valid-as-lhs | javascript, vue.js, v-model | 1,654,093,723 |
se_44882485 | stackoverflow | FRONTEND_DEVELOPMENT | Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null | Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null
I am trying to stream a video file via socket.io to my client (currently using Chrome as client).
I am only getting the first frame of the video and afterwards the Failed to appendBuffer is appears:
... | https://stackoverflow.com/questions/44882485/failed-to-execute-appendbuffer-on-sourcebuffer-the-htmlmediaelement-error-a | javascript, android, html, android-webview, media-source | 1,499,075,330 |
se_30580736 | stackoverflow | FRONTEND_DEVELOPMENT | Angularjs changing class on mouseenter (hover) | Angularjs changing class on mouseenter (hover)
I have the following ng-repeat that displays a star whether or not item.default is equal to true
<div ng-repeat="item in items">
<i class="fa" ng-class="item.default == true ? 'fa-star' : 'fa-star-o'"></i>
</div>
I am using fontawesome and I wanted to do the followin... | https://stackoverflow.com/questions/30580736/angularjs-changing-class-on-mouseenter-hover | javascript, css, angularjs, angularjs-ng-repeat | 1,433,183,708 |
se_18480550 | stackoverflow | FRONTEND_DEVELOPMENT | How to load all the images from one of my folder into my web page, using Jquery/Javascript | How to load all the images from one of my folder into my web page, using Jquery/Javascript
I have a folder named "images" in the same directory as my .js file. I want to load all the images from "images" folder into my html page using Jquery/Javascript.
Since, names of images are not some successive integers, how am ... | https://stackoverflow.com/questions/18480550/how-to-load-all-the-images-from-one-of-my-folder-into-my-web-page-using-jquery | javascript, jquery, html, image | 1,377,670,236 |
se_28857078 | stackoverflow | FRONTEND_DEVELOPMENT | Issue when copying one array into another | Issue when copying one array into another
I am trying to put the contents of an array into another. I have this json ($scopeProducts)...
{
"ID": "...",
"Groups": [
{
"Products": []
}
{
"Other": []
}
]
}
And I am trying to add the following json into the 'Products' array ($scope.selectedPro... | https://stackoverflow.com/questions/28857078/issue-when-copying-one-array-into-another | javascript, arrays, json, angularjs | 1,425,479,581 |
se_43879349 | stackoverflow | FRONTEND_DEVELOPMENT | Filtering and searching through 2 different arrays of objects with JS | Filtering and searching through 2 different arrays of objects with JS
I have two arrays of objects, and I need to work out what is the best way to filter one of these arrays, with the objects of the other array?
First array is called drinksType
[
{
"id": "GROUP1",
"type": "Water"
},
{
"id": "GROUP2",... | https://stackoverflow.com/questions/43879349/filtering-and-searching-through-2-different-arrays-of-objects-with-js | javascript, arrays | 1,494,362,025 |
se_62220653 | stackoverflow | FRONTEND_DEVELOPMENT | Having issues fetching Google Map | Having issues fetching Google Map
I'm having issues fetching Google Map, it says the page can't load correctly, I also have some errors on my console. I don't understand what I'm doing wrong, I should be able to make a query and have the places showing in the suggestions, but I'm doing something wrong. Here is my comp... | https://stackoverflow.com/questions/62220653/having-issues-fetching-google-map | javascript, reactjs, google-maps, error-handling, fetch-api | 1,591,376,838 |
se_23258088 | stackoverflow | FRONTEND_DEVELOPMENT | Can PHP run after the page is loaded? | Can PHP run after the page is loaded?
So PHP is executed server-side. But is it possible for PHP to be run after the page is loaded?
To illustrate, if I had a value (stored in a file, lets say) that changed every second. When I hit a button that uses Javascript to ask PHP to get that value, does it display what the v... | https://stackoverflow.com/questions/23258088/can-php-run-after-the-page-is-loaded | javascript, php, server-side | 1,398,302,332 |
se_54657785 | stackoverflow | FRONTEND_DEVELOPMENT | How to display a google map inside modal bootstrap 4 | How to display a google map inside modal bootstrap 4
I would to disply inside the modal a google map withtout to use the api.
Inside the loop the coordonae can change (I write just a constant for this example)
I tried this. The modal appear but not the map.
Thank you
my loop
$i = 0;
foreach ($result as $va... | https://stackoverflow.com/questions/54657785/how-to-display-a-google-map-inside-modal-bootstrap-4 | javascript, php, google-maps, bootstrap-4 | 1,550,001,425 |
se_20861979 | stackoverflow | FRONTEND_DEVELOPMENT | How to make getElementsByClassName do changes to all elements? | How to make getElementsByClassName do changes to all elements?
I am new to javascript, I want to apply changes to all the elements with the same class name but I can only get my script to make the changes to the first element.
This is my script. Thanks in advance.
function ReadMore(){
var txt = document.getElement... | https://stackoverflow.com/questions/20861979/how-to-make-getelementsbyclassname-do-changes-to-all-elements | javascript | 1,388,515,776 |
se_79925945 | stackoverflow | FRONTEND_DEVELOPMENT | Cycode scan recommends HTML sanitization for iframe.src assignment, but I'm only using a URL—what is the proper mitigation? | Cycode scan recommends HTML sanitization for iframe.src assignment, but I'm only using a URL—what is the proper mitigation?
We have the following code in our Angular application:
const auth_token = sessionStorage.getItem('auth_token') ||
this.sessionStorage.retrieve('authenticationtoken') ||
... | https://stackoverflow.com/questions/79925945/cycode-scan-recommends-html-sanitization-for-iframe-src-assignment-but-im-only | javascript, security, iframe, sanitization | 1,776,251,343 |
se_24031357 | stackoverflow | FRONTEND_DEVELOPMENT | Websocket and cross-domain | Websocket and cross-domain
Currently, I am developing two webapps :
the core, developed in Java with Vert.x, receives data from a lot of other apps and sends it to client)
the client, developed in PHP/JS, display data from the core.
The client isn't on the same domain as my core for the production phase.
Since ... | https://stackoverflow.com/questions/24031357/websocket-and-cross-domain | java, javascript, websocket, vert.x | 1,401,866,356 |
se_46247933 | stackoverflow | FRONTEND_DEVELOPMENT | Loaded html not fetching JavaScript files | Loaded html not fetching JavaScript files
I have a html page which dynamically loads the contents of another html file into a div.
function loadHTML(url, id) {
req = new XMLHttpRequest();
req.open('GET', url);
req.send();
req.onload = () => {
console.log(req.responseText);
document.getE... | https://stackoverflow.com/questions/46247933/loaded-html-not-fetching-javascript-files | javascript, html, css | 1,505,512,478 |
se_34286460 | stackoverflow | FRONTEND_DEVELOPMENT | JQuery does not work in Firefox but works in Chrome | JQuery does not work in Firefox but works in Chrome
I'm having trouble with jQuery and Mozzila Firefox.
Everything is working just fine in Chrome, but somehow Firefox does not see jQuery.
This is how I call jQuery
<!-- Favicon and touch icons -->
<link rel="shortcut icon" href="assets/ico/favicon.png">
<... | https://stackoverflow.com/questions/34286460/jquery-does-not-work-in-firefox-but-works-in-chrome | javascript, jquery, css, google-chrome, firefox | 1,450,174,587 |
se_66289817 | stackoverflow | FRONTEND_DEVELOPMENT | Reading K3 / K3-Pro Thermometer using WebUSB | Reading K3 / K3-Pro Thermometer using WebUSB
I just came across WebUSB and new to this API.
I am looking at capturing from my web application 2 fields, 1 from the USB barcode scanner and the other from a USB K3/K3-Pro Thermometer device the temperature.
With only the barcode scanner, i have no issue previously as it a... | https://stackoverflow.com/questions/66289817/reading-k3-k3-pro-thermometer-using-webusb | javascript, google-chrome | 1,613,812,195 |
se_11285065 | stackoverflow | FRONTEND_DEVELOPMENT | Limiting framerate in Three.js to increase performance, requestAnimationFrame? | Limiting framerate in Three.js to increase performance, requestAnimationFrame?
I was thinking that for some projects I do 60fps is not totally needed. I figured I could have more objects and things that ran at 30fps if I could get it to run smoothly at that framerate. I figured if I edited the requestAnimationFrame sh... | https://stackoverflow.com/questions/11285065/limiting-framerate-in-three-js-to-increase-performance-requestanimationframe | javascript, html, canvas, three.js, requestanimationframe | 1,341,171,560 |
se_49005541 | stackoverflow | FRONTEND_DEVELOPMENT | Use conditional formatting formula to check if cell is blank with Office.js | Use conditional formatting formula to check if cell is blank with Office.js
I have recently started using Office js .I am trying to implement the formula ISBLANK() to check if a cell is blank using Office.js. There are examples of conditional formatting with CellValue, ColorScale, PresetCriteria etc.
For example:
var ... | https://stackoverflow.com/questions/49005541/use-conditional-formatting-formula-to-check-if-cell-is-blank-with-office-js | javascript, office-js | 1,519,724,602 |
se_45448813 | stackoverflow | FRONTEND_DEVELOPMENT | Call text to column Excel function from JavaScript? | Call text to column Excel function from JavaScript?
Inside Office.js in Excel 2016, how can I call Excel's text to column function from my JavaScript code?
Is this feature available yet in Office.js, or do I need to submit a feature request for it (https://officespdev.uservoice.com/forums/224641-feature-requests-and-f... | https://stackoverflow.com/questions/45448813/call-text-to-column-excel-function-from-javascript | javascript, office-js, excel-2016 | 1,501,627,765 |
se_45334250 | stackoverflow | FRONTEND_DEVELOPMENT | Get and write to visible cells | Get and write to visible cells
I have a simple Office.js app that reads data from a single column, looks up something, and then outputs results to the adjacent column. It works fine under normal conditions, but if the table is filtered, it ignores the filtering and still looks up everything.
I've come across .getVisib... | https://stackoverflow.com/questions/45334250/get-and-write-to-visible-cells | javascript, office-js, excel-2016 | 1,501,091,722 |
se_43219369 | stackoverflow | FRONTEND_DEVELOPMENT | Custom headers in Excel table | Custom headers in Excel table
Is there a way to create a table in Excel using office js with custom headers?
As of now, any table am creating has the default headers as Column1, Column2, etc. I want to override the same with any custom header names like Header1, Header2, etc. Is there any way to do so?
I'm creating th... | https://stackoverflow.com/questions/43219369/custom-headers-in-excel-table | javascript, office-js | 1,491,348,205 |
se_79990355 | stackoverflow | FRONTEND_DEVELOPMENT | How to reset ContentControl.Color to default? | How to reset ContentControl.Color to default?
I'm currently creating a Word add-in using the JavaScript API.
I'm changing the colour of certain ContentControls:
const contentControls = context.document.contentControls;
contentControls.Items[0].color = "#33333";
How can I reset the colour of this ContentControl back t... | https://stackoverflow.com/questions/79990355/how-to-reset-contentcontrol-color-to-default | javascript, node.js, ms-word, word-addins | 1,785,839,216 |
se_79950873 | stackoverflow | FRONTEND_DEVELOPMENT | How do I generate SEO-friendly meta tags in React? | How do I generate SEO-friendly meta tags in React?
I'm developing a React-based website and want to improve its SEO performance. Since React applications often render content on the client side, I'm looking for the best way to manage dynamic meta tags for different pages.
Specifically, I need to:
Set unique page titl... | https://stackoverflow.com/questions/79950873/how-do-i-generate-seo-friendly-meta-tags-in-react | javascript, reactjs, seo | 1,780,494,037 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.