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

how to shift a date to the following month (fixed day)

I have a date in javascript that is dd/mm/yyyy format. I wanto to calculate from that date another date with the following requisites: month will be the following from the date chosen (january will...

View Article


How to sorting post by rating count in wordpress using dropdown?

Here is my code<div class="col-sm-3" class="drop"> <?php if ( is_archive() ) { ?> <select name="sort-review" id="sortbox"...

View Article


Callback once chat is ready

I am building a ChatBot service using the Microsoft Bot Framework, over Azure as the service, and QnA Maker for the key-value-pairs.In our implementation, we are having everything completely hosted in...

View Article

Divide array based on inner array conditions

I have an array like :let colors=[ [ 31236780195925 ],[],[],[],[],[ 31236780163157 ],[],[],[ 31236780228693 ],[],[],[],[],[] ] inner array values can differ, I want result like in the following...

View Article

Image sprite doesn't show in my canvas with PIXI JS

My image sprite (game.player_booba) doesn't appear and I do not understand why. In spite of the modification of its position in x and in y it does not appear.game.player_booba.init();...

View Article


Highlight Menu Item when Scrolling Down to Section

I know this question have been asked a million times on this forum, but none of the articles helped me reach a solution.I made a little piece of jquery code that highlights the hash-link when you...

View Article

Show alert error message when certain condition arises

I have the following code on page load that I use to show an error alert: protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request.QueryString["message"] ==...

View Article

(Wordpress): Decision Tree / Simple Conditional Buttons

I have already searched the Internet and numerous forums, but have not yet found a useful solution for this actually quite simple case. I hope you can recommend something to me here. Maybe I just don't...

View Article


jest-fetch-mock: mocks only work if they are declared in components

I'm trying to test a React app with Rails backend. I'm trying to write tests in jest.I'm using jest-fetch-mock node module to mock API calls. For some reason, it doesn't work properly.This works, but...

View Article


Single page rendering in pdf.js

Currently I am using build version from here https://mozilla.github.io/pdf.js/getting_started/#downloadI would like to show only one page of pdf at screen in normal mode (not presentation...

View Article

Image may be NSFW.
Clik here to view.

Webpack4 serve files with different path name

I am running localhost:3042. My files are serving in network tab like this:But I have to serve the URL like: http://localhost:3042/dual/main.27678bfec444f64cd7ab.jsI am using mod_proxy to serve this...

View Article

Assign encrypted value into session storage

I am trying to assign the encrypted value into session storage in .cshtml file. but I couldn't. I am getting a different error each time. Error I got: Uncaught SyntaxError: Unexpected token ')',...

View Article

React v16.5.2 - Raising a popup message with an unconditional screen refresh...

I have a requirement to display a popup message (similiarly to the outcome of the "confirm" function of Alertify.js), and to unconditionally refresh the screen after the popup is being closed by the...

View Article


Use javascript to simulate a click on HTML select option

I am trying to use checkboxes to select an option in an HTML select element. I have it NEARLY working and a working demo can be seen here -...

View Article

Image may be NSFW.
Clik here to view.

Serving an Iframe in Google Colab Notebook: localhost refused to connect

I am trying to serve some HTML from a Google Colab notebook using the following:from IPython.display import IFrame IFrame(src='./output/index.html', width=700, height=600) However, this throws...

View Article


React, handle a button click from a modal called from another function

I have this code where I call to a modal function:handleValidation = async (id) => { const { scadaValidation } = this.props; const result = await scadaValidation(id); if (result.statusCode !== 200)...

View Article

How to get HTML file contents as a string in javascript

I'm trying to get the contents of an HTML file in JavaScript as a string.Wrote such code, but does not work, displays an error: Error: Cannot find module 'xmlhttprequest'How ca i fix it, or are there...

View Article


Image may be NSFW.
Clik here to view.

Return the values of an object inside of array

I am trying to return a value of an objects that are inside of an array. const bugSchema = new Schema({ title: { type: String, required: true }, comments:[ { user:{ type: String, required: true },...

View Article

Invoking bundle.js built via webpack from create react app

I have created a bundle.js file with webpack from my create-react-app project as it sits with the below config:const path = require("path") const UglifyJsPlugin = require("uglifyjs-webpack-plugin")...

View Article

Memory usage of javascript array

I am currently javascript developer coming from java, but advancing my knowlendge in data structures & algorithms, so in Java, C, or C++, while declaring array we need to assume its length first...

View Article
Browsing all 139805 articles
Browse latest View live


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