Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Browsing all 142100 articles
Browse latest View live
↧

jQuery.html() function does not preserve values in selects and inputs in...

I have content generated by PHP, but changed dynamically by jQuery. DOM is generated based on user's choises and I need all inputs, selects etc. be saved when user choose any option which re-generate...

View Article


How to remove the comma using the replace in angular

here's the code: https://stackblitz.com/edit/angular-w5ecbw?file=src/app/app.component.tsitem.component.tsngOnInit() { const data = ['.23.2 ms','.23.001 ms', '.23.81 ms', '192,101.02 ms', '1291,291.02...

View Article


Image may be NSFW.
Clik here to view.

On webpack how can I import a script without evaluate it?

I'm recently working on some website optimization works, and I start using code splitting in webpack by using import statement like this:import(/* webpackChunkName: 'pageB-chunk' */ './pageB')Which...

View Article

How to inject brackets into html template for javascript array type

I need to build an array type in javascript using database information. In order to do that, I have to add "},{" between each array index. I am trying to inject a literal },{, no quotes, using:...

View Article

Scrolling reset when overflow: scroll;

I have a "div" with position: fixed; But If I add overflow: scroll; or overflow: auto;, refreshing the page also reset the scroll position to the top. I want the scroll position to remain the same when...

View Article


How to display Bet Calculator result on my html page with code created in...

// NFL Teaser Bet Payout function betCalculator(points, numberOfTeams) { var odds; var numberOfTeams = +prompt("Enter No of Teams"); var betAmount = +prompt("Enter Bet Amount"); // 2 Teams Bet...

View Article

how to get key having special character(_) in object javascript

I would like to know how to fetch the keys in object contains only underscore in javascript.I would like to get the output with text before underscore, as shownvar obj={ cn_start: "SG", cn_end:"TH",...

View Article

Image may be NSFW.
Clik here to view.

Is it possible to externalize Electron menu template code?

I have an Electron app with 3 windows and each window has a different menu. The menu template code for each menu is quite long and I would like to externalize it. So far nothing I have tried works.I've...

View Article


Image may be NSFW.
Clik here to view.

Can't use Firestore timestamp('toDate' of undefined)

I use Firestore in React. And this application saves created_at datetime as Timestamp object to Firestore like below. use firebase.firestore.FieldValue.serverTimestamp().export function...

View Article


Image may be NSFW.
Clik here to view.

A smart & safe way for a webpage to interrogate a "web broker" PC

Here is the situation. There is data on a PC from a legacy application which needs to be interrogated by a web page. I have developed a means to do so which I will outline next. But what the question...

View Article

PrimeNG AutoComplete - capturing input box only key strokes

I'm trying to implement a search text box using PrimeNG's AutoComplete component where the search function is triggered by hitting the enter key. AutoComplete emits an onKeyUp event, however that event...

View Article

I'm getting error Object expected when trying to open a .js file

I am very green, so bear with me.I am trying to open a .js file and am getting the following message. Please see below for the full code. I'm sure someone will immediately spot the issue. I have no...

View Article

Vue JS Vuetify Expansion Panels Inside a V-for Loop Opening all panels

I am pulling data from a data base and looping through the data in the DOM with a "v-for" loop. I have vuetify expansion panel components inside the loop. The issue is if the user clicks to open one...

View Article


Form Input Not Accepting Spaces

I've got a form using JavaScript that sends a user to a different page depending on their input using "if/else" statements. However, the input field will not accept spaces. It will accept every...

View Article

google apps script get keycode events from document

I'm trying to be able to modify parts of a google document while the user is typing.Specifically, I want to add a feature to indent multiple lines of text. Meaning when the user selects multiple lines...

View Article


Cypress - How to restrict a constant value?

I am loading a fixture via constant (there are some reasons why I am not using cy.fixture) . I loop through a group of users - Cypress._.range(3, 19). import users from '../../../fixtures/users.json';...

View Article

Embed Calendly into React

Calendly provides this embed code that gets added to the page and displays calendar options to choose from.<div class="calendly-inline-widget" data-url="https://calendly.com/username"...

View Article


Why are my js.erb views not working when using webpacker in Rails 6 with...

Im trying to add som simple Ajax to my rails app. I am using Bootstrap with webpack. My webpack/environment.js file looks like this const { environment } = require('@rails/webpacker') const webpack =...

View Article

Comparing two arrays with objects with unordered keys

I know they're several questions that indicate how to do this, however, when the keys of the objects are in a different order the provided solutions do not work.let array1 = [ { name: 'David', age: 30...

View Article

Destructing assignment to swap the values in ES6

I am revising JavaScript and came to following ES6 example. let a = 8, b = 6; // change code below this line [a,b] = [b,a]; // change code above this line console.log(a); // a is 6 console.log(b); // b...

View Article
Browsing all 142100 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>