Category "javascript"

Jest (unable to set unique href for window.parent.location.href)

I have in my code a check to see if a page is being loaded inside iframe. App.js if (window.location !== window.parent.location) { console.log('App is running

Star and Half Star Rating in Laravel

I want to display average product ratings in star. The values are displaying good but I want to show half star if the value is in float. My blade view: <div

TypeError: undefined is not an object (evaluating 'navigator.serviceWorker.addEventListener')

I want to use Firebase Cloud Messaging to send notifications to the users, but I am getting this error when I try to setup messageing: TypeError: undefined is

How to redirect to new page with Authorization Headers after login?

I have a login page. On click of login button, the details are sent to server and are validated. A token is received in return after successful validation. I ne

How to insert price based on checkbox checked

I have a form where I calculate the price based on the checkboxes checked. But I am having trouble as its not updating the final price correctly. I did some jQu

can't resolve module inside subdirectory typescript

The module arrayGenerator.ts lies inside a subfolder, it works fine for other modules(Array.ts) inside the parent folder. But when I add a new module Sorting.ts

Bottle.py | request.forms.get() returning NoneType using AJAX

I am trying to send javaScript information into a bottle.py server using AJAX. After trying nearly every solution I could find on stackOverflow, bottle docs, or

DOM Parser Chrome extension memory leak

The problem I have developed an extension that intercepts web requests, gets the HTML the web request originated from and processes it. I have used the DOMParse

Can't stringify an array-of-objects variable in react project

As you can see in the picture, steppedJobDataState is not empty. But x = stringified steppedJobDataState, and yet logging that shows an empty set of arrays. I'm

How to get Auth0 User object in getServerSideProps?

I am trying to use Auth0 with NextJS for user authentication. After login I want to access the user object in getServerSideProps. I followed this link below, St

MQL5, Python, Javascript integration. Two (or more) computers

Any MetaTrader/MQL + python integration gurus here? It is my understanding (please correct me if I'm wrong) that I can follow the instructions here to build the

How can I 'not allow' the user to retrieve same information from the server multiple times in my 'React' Weather-app?

I'm learning React and as a practice I'm building a weather-app. My App Photo Everything is ok. but I want When a User type a City name for example 'London' and

Why do i keep getting undefined when accessing a inherited property? [duplicate]

I'm trying to use prototypal inheritance and its not working, everytime i try i keep getting undefined: function HospitalEmployee(name) { th

ASP.NET Core Web API CORS error on Firefox but okay on Chrome

I have a React and ASP.NET Core 2.2 SPA that has a CORS issue with Firefox but is okay in Chrome and Edge. I've created a little test rig that consists of the A

Unable to set property 'wrap' of undefined or null reference

I'm building a bundle with webpack + babel for browser, targeting it to ES5. When I try to use it, an error Unable to set property 'wrap' of undefined or null r

Functions and Strings in JavaScript

I'm just starting programming, I have this issue and I can't finish it. where to use startsWith inside the function? function werewolfCheck(name) { if (na

Error in my react app file - module not found can't resolve

Error: Compiled with problems:X ERROR in ./src/App.js 8:0-63 Module not found: Error: Can't resolve '.src/components/NewsCards/NewsCards.js' in '/Users/admin/

Error in console: ng.probe is not a function

Yesterday I updated Angular CLI and core to 8.0.0v. After that I successfully initialized a new app and ran it. Once the app was built and served on localhost:4

Numeric and alphabetic sorting XML table error from buttons

<!DOCTYPE html> <html> <style> table,th,td { border : 1px solid black; border-collapse: collapse; } th,td { padding: 5px; } </style&g

How to use two dropdown menus to select variables for JavaScript

I have to make an alert that pops up after two options to fight that gives the results of the fight (script.js was provided). When I select the two contestants,