I had already done research on this topic but i was not fully satisfied with the answer . I knew that for some security reason browser is not allowing user to disable browser back or to make browser …
Tag: javascript
jquery – upload image file using ajax is not working
I want to submit my image via jquery and ajax , this is my code: just to add some explanation , when the use choose an image , the form submits immediately . it works fine and post the data to my php page , but it’s empty and has no data I put print_R($_POST) in my page and the
Creating a transparent navbar in bootstrap to be use in Gatsby JS app
I am trying to use bootstrap 5 to make a scrolling transparent navbar, however I am using jQuery and I need to convert it to react or simple javascript. Here’s my HTML: And here’s my jQuery that I need to convert: You can see the JSFIDDLE here: https://jsfiddle.net/bootstrapious/ravpqxok/ Any idea…
How to increase all values of a map in javascript
I have this map: And I want to add this new key/value: How can I increase the values of all the old map elements in 1? So I get the following map: Answer You can use something like this:
What is the type of the callback function in filter of Typescript?
Problem is here: Typescript is saying that I have not specified the type of v. What would be the type of v here? How to specify it? Answer depending on the orderData schema it would be like this but after you map it to an array of IDso your schema would be like this
How to replace Unicode characters in the following scenario using javascript?
How to replace Unicode characters in the following scenario using javascript? Using javascript I want to replace Unicode characters with a wrapper according to their style. If possible include a range of Unicode characters([a-z]) in regex for styles other than regular. input = abc𝑢𝑣𝑤𝑥𝐚𝐛𝐜𝐝𝒇𝒈𝒉𝒊 expected ouput =…
Firestore data not displaying in my flatlist?
I am trying to display the posts of whoever a user is following: First, I query firestore and get the list of all the users the current user is following For each user in “following”, I get their posts I order their posts by data created, using a javascript sort function Here is the code: The issu…
variable defined in one function and undefined in other typescript
I have the following code: the console.log in count() is defined and working fine, but when i try to use this.dust in buyBook() it returns as undefined. Why is this and how do I fix it? Answer You want to bind the this context for buyBook, or the event handler will redefine the this context. Edit: Also, I thi…
javascript: onclick=”scrollWin()” doesn’t work as intended
I have the following simple page: a header with a name on the top left that disappears when you scroll down (you see the menu on the bottom right instead) a fixed background picture (parallax) and a menu at the bottom right corner which shows up when scrolling down (because of the parallax) Apart from scrolli…
Discord music bot: prefix not defined
I wanted to make a music discord bot and I’ve been having trouble with it for a while. and I keep getting an error and I got this code from CodeLyon’s video called “Make Your Own Discord Bot | Music Bot (Play, Skip, Stop Commands)” I keep getting the same error when I try it: Reference…