javascript Questions
11
Solved
<input name="e_password" id="e_password" type="password" autocomplete="off" />
The above is a password field which for some reason, is automatically filled only in Mozilla (not in Chrome an...
Sharynshashlik asked 25/7, 2015 at 8:45
2
Solved
I am trying to print a modal using window.print() command. The problem I am facing is that for eg. the content on modal is of 1 page long but when i print it shows 2 pages with same content getting...
Vickers asked 23/3, 2020 at 9:14
2
I want to create a Tournament (if not exists), and a Match (if not exists) associated to the Tournament.
let [match, created] = await Match.findOrCreate( {
where: {scoreHome: 97, Tournament: {nam...
Manana asked 6/8, 2017 at 10:0
3
Solved
I am using the below code to open the page in a new window its working as expected but when I Right click "open in a new tab" its blocking with "about:blank#blocked", i am expec...
Camise asked 11/8, 2020 at 13:52
8
Solved
I have tried the following but it's throwing an exception:
if (!$get('sslot_hf0').value in ('X', 'Y', 'Z', '0')) {
$get('sslot_hf0').value = 'X';
}
I am looking for a function similar to the ...
Sondra asked 1/1, 2013 at 5:13
2
I'd like to lint the files in my rails project (ideally, in my editor while making edits) via eslint, but I am currently unable to lint files that are pre-processed with ERB.
How can I include *.j...
Snowber asked 10/6, 2015 at 5:16
20
Solved
function reverseInPlace(str) {
var words = [];
words = str.split("\s+");
var result = "";
for (var i = 0; i < words.length; i++) {
return result += words[i].split('').re...
Lamoreaux asked 19/3, 2018 at 10:26
3
Solved
I want when the user scrolls from the bottom to the top of a div to load more items into that div to the top part of the div and I want to maintain the scroll position (or rather make sure the top ...
Terrorize asked 24/6, 2020 at 16:39
3
Solved
I have a simple login form, but validation rule with type: 'number' for input item tn doesn't work. Even if I enter a number, I get 'tn' is not a valid number' in console.
import React from 'react...
Ocotillo asked 14/12, 2020 at 16:45
4
Solved
I have create an app with react.js. I wanted to go into production.
I did
npm run build
serve -s build
I go on localhost:5000
The welcome page works very well, but when i go on localhost:50...
Arbour asked 25/4, 2019 at 11:31
1
I am trying to make the format showed with the html input attribute type="date" from English format to European format. I only want to display the European format to the user, but not aff...
Bunkum asked 22/2, 2022 at 12:29
1
I have a background and an unlimited amount of images or animations where I'd like to mask or clip part of the image or animation to the background. I'd like the user to use or move around a polygo...
Vocalist asked 29/4 at 15:15
4
Solved
For an array: ["5","something","","83","text",""]
How to remove all non-numeric and empty values from an array? Desired output: ["5","83"]
Morganite asked 3/6, 2014 at 18:47
3
Solved
My vim syntax highlighting just lead me to believe that status is a keyword in JavaScript.
Searching around all I can find are articles about window.status in browser JavaScript. Is this the meani...
Wonacott asked 6/4, 2018 at 2:50
4
I'm using google's recaptcha in an angular project, it works as expected but I can't figure out how to reset it.
I have a form in which the user sends data and I would like after a successful post...
Upmost asked 21/9, 2015 at 10:5
2
I'm using the following HTML, CSS and Javascript to disguise a video player as an audio player.
It works perfectly in Firefox but in Chrome pressing the play button does not actually play anything....
Mischievous asked 25/9 at 6:5
5
I am trying to convert $3.77 (USD) to cents as follows:
const number = "3.77"
const separe = number.replace(".", "")
Is that the correct way to convert USD to cents? ...
Painless asked 8/9, 2020 at 19:37
5
How can I test JavaScript code without using an additional framework such as Mocha? Is it possible to create a unit test case, write test functions manually, test the code, etc.?
I've tried to writ...
Pettish asked 4/10, 2019 at 19:25
3
I need to create a simple tooltip library that works like this:
every DOM element with a specific attribute combination (like class="tooltip", data-tooltip-text="some text") automatically displays...
Openminded asked 7/3, 2019 at 14:24
3
Solved
What would be the ideal way to manage a video player using Redux, primarily in terms of dispatching actions to play/pause a video?
I'm working on building a video player in a React application, an...
Aguascalientes asked 9/3, 2016 at 18:6
4
Solved
I don’t understand why this piece of code results in such an order? Could anyone elaborate on this? I thought Promises were like a FIFO queue, but the nested Promise functions seems a little bit un...
Goldofpleasure asked 7/10, 2019 at 13:18
3
I'm a newbie on test driven development, and I came across a section regarding testing/mocking a fetch api. But I'm struggling to write my own test. I built a simple weather app just to test/mock t...
Pressing asked 4/9, 2022 at 5:45
2
Solved
I'm trying to create a link to start a conversation on whatsapp from my react native app, but the method Linking.canOpenURL() is allways retuning false...
My code is the following:
const url = `w...
Retrace asked 10/3, 2018 at 15:45
4
I'm trying to write an extension that will modify the User-Agent on all outgoing requests from Chrome.
For http://, https://, ftp://, file://, or chrome-extension:// I can use the chrome.webReques...
Neural asked 8/5, 2015 at 12:28
4
Solved
The <dialog> element will receive focus once it is opened and I know that this is the intended behavior. However, I thought about using a <dialog> element to show a short notice at the ...
Osman asked 1/6, 2022 at 18:38
© 2022 - 2024 — McMap. All rights reserved.