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

How to update parent v-model using child components' prop?

My parent component has the following child component:<editor :editorBody="formData.englishBody"></editor> My parent component has the following data:data () { return { // allContent: null,...

View Article


Semi-colon causing problems when coding in JQuery

The code below is in a file called "boot.js":<script> $(document).ready(function(){ $(".div1").on({ click: function(){ $(this).css("background-color", "red"); } }); }); </script> I get...

View Article


How can i update the whole TD Columns in javascript?

How can i update the all TD, using javascript, base on what will the user will enter in date?so for example.select date: February 25, 2020 ```GO``` my table HOUR Column will be updated. without...

View Article

How to center buttons in image using Bootstrap 4

I have two adjacent responsive images, each with a button that I would like to be centered in the image. Right now the buttons are just sitting below the images. Here is my code<!--LAB1-->...

View Article

Why is Bar chart with Dates as X axis and Zoom on Brush not working?

I am trying to create a simple bar chart where the X axis is a date scale and the Y a total count of events that occurred on a date.Additionally I’m trying to add the capability to brush and zoom into...

View Article


How to populate dropdown on loading through flask?

What i have tried: Here is my test.html which gets options(list) from test.py<select> <div class="test"> <option selected="selected"> Select </option> {% for option in options...

View Article

Python funtion similar to Javascripts

Guys please help me with python function which should be similar to the following Javascript function. function compareCollection_bmp_all(pricebook, pricebook2){ var date=Date(); print("start time is...

View Article

Image may be NSFW.
Clik here to view.

bootstrap 3 accordion collapse does not work on iphone

These "accordion submenus" work in chrome and firefox, but not on an iphone.I have built a site which includes an "offcanvas" navigation menu on smaller screens. The user clicks "the hot dog button",...

View Article


Applying filter option from an array [duplicate]

I am trying to apply filter option from an array. options = [ "car", "bike", ] I have multiple filter select, that's why using an array to contain more then one option. and let's say there is array...

View Article


Drag and drop between two lists with preselect

I want to use Sortable library for my project, but i have the following issueHere is a simple example at JS Bin1. Item 3 is pre-selected 2. When you drag Item 2 to list2 without selection -...

View Article

How can I keep finding the Max value in an Array and keep incrementing the...

I want to manipulate an Array during a loop in such a way that I want to:1 - find current maximum number in the array (would need to keep updating this value during the loop)2 -push this number adding...

View Article

Drag and drop div anywhere in screen but div should not come over to each other?

I want to Drag and drop div anywhere in screen but div should not come over to each other, if anyone drop div over other it should placed on next possible space?Demo Linkwindow.onload = function() {...

View Article

catch error `module must start with either "/", "./", or "../"`

Example<!-- index.html --> <script type="module"> import 'someModule'</script> TypeError: Error resolving module specifier: someModuleUncaught TypeError: Failed to resolve module...

View Article


How to apply coupon code after users close popup?

Background:I have a popup that request emails from users. Should they complete the email submit, I would like to apply a coupon code automatically should they subsequently make a purchase at...

View Article

How to check the XSS issue in Javascript file or how to apply sanitizer in JS...

How to apply sanitizer or Vulnerability issue of code in below.***var optval = document.getElementById(idFrom).value;*** XMLHttpRequest. Open("GET", optval, true) ;

View Article


How to create html on the fly for Facebook Instant Article

I want to create html on the fly by replacing some links in a HTML template. I will get these links from DB and publish facebook instant articles in bulk. `FB.api('599265696800679/instant_articles',...

View Article

How using onclick event on li to display block (CSS)

How can i do? I hope the block(li) will change color after selection"onclick" should keep the color changing. But onclick has not changed. (Only use "onclick", not use "a herf")css<style> #table...

View Article


Date and Time function formatting

I am so new, so please be kind. I have this question in js class basically 101:Create a function called dateWriter with three parameters (year, month, and day) and return a new date using the passed-in...

View Article

How would I do a for loop that waits until my function has completed for each...

My current code is this:const fs = require('fs'); var file = fs.readFileSync('file.txt').toString().split("\n"); for(i in file) { var [thing1, thing2, thing3] = file[i].split(":"); myfunction(thing1,...

View Article

Blazor - Create select box dynamically

I'm translating an old JavaScript/JQuery application into Blazor and one of the last things I need to figure out is how to add a select dropdown, with options, dynamically onto the UI. In the old...

View Article
Browsing all 138134 articles
Browse latest View live


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