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

Issue when appending special characters string its replacing with Unicode format

When I try to append a string in some input type text value field in php using JavaScript then it replaces special character in Unicode format like ` (a backtick) with &#39.How to display as...

View Article


Search strings with "indexOf" fails

I'd like to display the message Exist! if the strings in the input field includes strings within the li tags.When I input cccc, the Exist! message appears successfully. However when I input aaaa or...

View Article


How to set active div in Javascript or jQuery?

I am trying to access Star Wars characters and want to select an active div with the character name. When I try to run it without Star Wars API characters it works fine and set the active div to red....

View Article

Converting Ternary Operator to if / else statements

I found a fix for my application, but I copied and pasted the code, which doesn't match with the rest of the code, I want to turn these ternary operators into if/else statements.const name = persona ?...

View Article

How to set scroll-behavior in Edge?

I want to use scrollLeft method with smooth behavior, but Edge doesn't support it. How can i do it? Something like menu.scrollBy({ left: 100, behavior: 'smooth' }); but in Edge.

View Article


Detect Close windows event by jQuery

Could you please give me the best way to detect only window close event for all browsers by jQuery?I mean clicking X button on the browser or window.close(), not meaning F5, form submission,...

View Article

I want to hide the submit button based on a PHPcondition through javascript

<?php if(mysql_num_rows($result5)>0) { echo 'condition matched'; // the above echo is just for testing ?> <script type='text/javascript'>...

View Article

Problem with Codewars Kata - Largest difference in increasing array

I am attempting to solve this Kata on Codewars: https://www.codewars.com/kata/largest-difference-in-increasing-indexes/train/javascriptConsider all of the pairs of numbers in the array where the first...

View Article


display an object in list

I have an object :{"0":{"color":[{"red":1,"value":100}],"brand":[{"id":0,"price":100}]}, "1":{"color":[{"blue":1,"value":100}],"brand":[{"id":0,"price":100}]},...

View Article


is there any Script available to stop fake click on blogger website

dear stackoverflow developers please help me ! currently I am using a blogger platform for running my website what I need a script by which can stop fake click from same IP address on my website.and...

View Article

Unable to filter the non empty array data using lodash filter

An array is as follows : const arr = [ { name: 'Aditya', hobbies: ['Football', 'Basketball'] }, { name: 'Amitabh', hobbies: [] }, { name: 'Akhsara', hobbies: ['Basketball'] }, { name: 'Aia', hobbies:...

View Article

Problem with saving canvas as image on server using toDataURL();

More Detailed background on this question is here, and I have attempted to look at the answer linked in that thread, which is where I am stuck.A have created a PHP file that loads via ajax inside a div...

View Article

How to wait for action to complete before redirecting in react redux?

I'm trying to log users in based on a isLoggedin state from redux store. My Login Component dispatches the fetchLogin action from the userLogin action mapped to props. const Login = (props) => {...

View Article


display hijri calendar using ummalqura mode javascript in the yii2 framewrok

I'm trying to add Hijri calendar to my yii2 web application,I got this resource on Github HIJRI CALENDAR and i do as it said https://github.com/balbarak/bootstrap-hijri-datepickerBut when my App starts...

View Article

Customize line colors between two points in ChartJS

I have a time line chart type. I would like to define color on every step between two dots depending on dataset object values.In my dataset data array I have added a third item which will define the...

View Article


JS mobile back camera wrong resolution

I got an android phone with 2 cameras, It has different resolutions at FRONT CAM and different resolutions at BACK CAM. I need to force the phone of using the BACK CAM which I achieve successfuly! The...

View Article

How can I fix the warping issue in jQuery?

What my blue fish should do: Move around to random positions on the screen and when you touch it with the mouse, it should flee to a random location fast, then continue swimming.What my blue fish does:...

View Article


How to center the mouse cursor above an dragged object if the object was just...

I have the following problem: I created a cube mesh consisting of five planes (The cube is unfolded and the mesh with all planes is visible. The z-coordinate of all planes is 0). All planes are...

View Article

How would I return an error message upon a failed search in react.js

I'm currently learning how to code the front end of a webpage in react.js and in order to complete the assignment, I need to return a message saying "Campground not found" when a user enters anything...

View Article

How to add data from promise into MongoDB?

I'm trying to add an array of json data from another server to a mongoDB collection, however I receive the this error message: "Cannot create property '_id' on string". However an array is passed in?...

View Article
Browsing all 138163 articles
Browse latest View live


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