Click here to Skip to main content
15,886,110 members
Everything / Programming Languages / Javascript

Javascript

Javascript

Great Reads

by Colin Eberhardt
This article describes the development of a cross-platform HTML5 application for Windows Phone and iPhone.
by Steve Krile
Fully AJAX-enabled user control used to select names from a database in a drop-down format.
by Marcelo Ricardo de Oliveira
A shoot'n'up HTML5 game made with Phaser game framework
by Serge Desmedt
A try it yourself guide to the basic math behind perceptrons

Latest Articles

by Jeremy Falcon
Just a simple routine and helper routine to generate unique IDs suitable for disconnected systems.
by Xavier Junqué i de Fortuny
Converts MathML coded string to/from plain text string
by Matthew Dennis
Create a ChatGPT-like AI module for CodeProject.AI Server that handles a long-running process.
by Akram El Assas
Microservices sample architecture using ASP.NET Core, Ocelot, MongoDB and JWT

All Articles

Sort by Updated

Javascript 

U 23 Apr 2024 by Jeremy Falcon
Keep in mind, I've never used Webflow. And it's going to be hard to find Webflow experts here as we're mostly programmers with no need for that. As for me, I've dealt with Figma plenty from a programmer's perspective. I can tell you; however,...
N 23 Apr 2024 by M-Badger
Let's assume that the arc is part of a circle. Let's assume that the centre of the circle is the point '+' on your diagram and hence the radius of the circle is 0.5 * b - call this point X. Call the intersection of the arc and the line on the...
U 22 Apr 2024 by Member 16073923
Hello Guys... I am struggling to make this done. Lines are easy, but I can not figure out the mathematic points for connection of line and arc... if anyone can help in any way, it would be highly appriciate. here[^] is a link to my picture ...
N 22 Apr 2024 by Dave Kreskowiak
There is no fix for this because it's a security feature. From the MDN Web Docs page on window.open: Quote: Modern browsers have strict popup blocker policies. Popup windows must be opened in direct response to user input, and a separate user...
N 22 Apr 2024 by Chris Copeland
I believe this is a modern security feature of browsers. Most browsers will not allow windows to be opened without direct input from the user. For example, browsers may require a "click" event, or form "submit" even, or even keyboard press. The...
U 22 Apr 2024 by Aman Zoraiz
Myy problem is that i have an application the app can b read RSS feeds and display them on my page or screen. Also i have used the timer to reload the component of rss feed. I have set some matching keywords like if some keywords match with rss...
U 21 Apr 2024 by mohamed gawdat
I want to create a website to sell products using Figma and Webflow. The problem is that I've heard a lot of people say that these sites have limited capacity, especially if there are a lot of products and videos (a large site). Is this correct?...
N 19 Apr 2024 by Jeremy Falcon
Just a simple routine and helper routine to generate unique IDs suitable for disconnected systems.
N 18 Apr 2024 by Pete O'Hanlon
First of all, thank you for posting a code sample with your question. Unfortunately, there's a lot of context missing from this question so we can't really help until you fill in some of the blanks. As others will tell you, we can't see your...
N 18 Apr 2024 by Member 10897967
Resource Name search on Project Online Resource Center PDP in Project Online Hi Team, It am trying to develop a JavaScript script to enable resource name search on Project Online Resource Center, but it's not filtering the resources as expected ...
U 17 Apr 2024 by Xavier Junqué i de Fortuny
Converts MathML coded string to/from plain text string
U 14 Apr 2024 by jv067i
Hello, I am taking the liberty of making a post on this site because I am encountering a problem using the LibSodium library, in JavaScript. The goal is to encrypt a message, so I execute: var i=sodium.crypto_secretbox_NONCEBYTES; var...
N 13 Apr 2024 by Andre Oosthuizen
You are generating the nonce incorrectly. Your 'sodium.randombytes_buf(i)' function expects the argument of 'i' to be the length of the buffer (in bytes) to be generated, not the actual value of the nonce length as per your code. The...
N 13 Apr 2024 by Graeme_Grant
It's a 3rd-party library. Best place is to ask in their issues on github: Issues · jedisct1/libsodium.js · GitHub[^]
6 Apr 2024 by Member 16235587
You can use cropperjs library. In that library there is method called "setCropBoxData(data)" you can set your co-ordinates and a cropper-box will be build on top of that co-ordinates. There are multiple options to change as your use case , I...
5 Apr 2024 by Pete O'Hanlon
My suggestion here mirrors the advice I would give anyone who has a bug in their software. What you need to do is debug your node service. Set breakpoints inside the code and check what data you receive when the call is made. To enable node...
4 Apr 2024 by yosf.143
this node.js controller does not save the size.name using utf-8 encoding Arabic characters, even though the rest of data is sent correctly to server with arabic encoding, i have tried to console log the size names and it reads them correctly but...
4 Apr 2024 by Matthew Dennis
Create a ChatGPT-like AI module for CodeProject.AI Server that handles a long-running process.
2 Apr 2024 by Graeme_Grant
I've just started recently looking at JS frameworks and tooling too. React is a UI framework. You need something like Next.JS to handle things like routing. For the back-end JS, you need to look at something like Node.JS. This is an interesting...
2 Apr 2024 by honey the codewitch
hey folks, my dynamic HTML is way out of date so I need someone to unstupid me. I have local HTML files (not online, but stored locally on the user's machine) that I want to put dynamic content in. It used to be JQuery was what was for dinner but...
31 Mar 2024 by Andre Oosthuizen
Your error says it all, you are trying to use React Hooks 'useState, useEffect, useContext,' etc. outside of a React functional component or in a non-React file. In your case, you are using the 'useHistory' hook from react-router-dom. This hook...
31 Mar 2024 by satrughna pradhan
import { Button, FormControl, FormLabel, Input, InputGroup, InputRightElement, VStack, useToast, } from "@chakra-ui/react"; import React from "react"; import { useState } from "react"; import axios from "axios"; import {...
28 Mar 2024 by Pete O'Hanlon
The answer that Dave gave you in the comments answers why you were seeing the problems in the code. You should be able to ignore any answers that appear and disappear. As Griff says, this was most likely a spam answer.
28 Mar 2024 by OriginalGriff
There is a good chance that the "solution" was deemed as spam and removed along with the author. Normally, the system spots these and prevents you being notified at all, but if it got through the system and was spotted later then it would have...
28 Mar 2024 by Nicholas Lombardi
I received an email with an answer to my question. Unfortunately, I deleted it by accident. When I went to the page with my question "Why first onchange JavaScript function works, but not the next" Page is here Why first onchange javascript...
27 Mar 2024 by Manoj B. Kalla
hi, 1. Take backup of page aspx and aspx.cs and Fresh start. 2. AutoEventWireup="true" and EventValidation setting 3. Double click on button and paste the code of click. Hope this will help
25 Mar 2024 by music0011 hop
function fetchAndExtractHTML(link, overwrite) { // Fetch the HTML content from the link fetch(link) .then(response => response.text()) .then(htmlContent => { // Create a temporary div element var...
23 Mar 2024 by Graeme_Grant
1. You should not use var[^] normally, you should be using let[^] or const[^] instead. 2. For selecting elements by id, it is better to use getElementById()[^]. 3. looking at the element style for the width will only return a width if you set...
23 Mar 2024 by Member 16228941
Hi, I was working on a package using the language JavaScript. And I met up with a problem. How can I link assign a varible? Like this: var a = document.querySelector("div#foo").style.width;//$("div#foo") var b=...
23 Mar 2024 by Akram El Assas
Microservices sample architecture using ASP.NET Core, Ocelot, MongoDB and JWT
22 Mar 2024 by Ron Anders
I have a Web App that runs in chrome. I use it in a windows environment without problem. I just had my wife who uses an M2 fancy Mac, try a control click (mouse tap) an element and it did nothing. She said that if she tapped control (tap and...
21 Mar 2024 by johntk22
make sure that the event listener for the add to cart and show cart is added correctly and the id in the JavaScript code match the id of button in the HTML.
19 Mar 2024 by Dan Letecky
Weekly HTML5 event calendar with CSS themes, drag and drop support, date navigator. PHP and ASP.NET Core REST API backends.
16 Mar 2024 by Tyler Bakeman
In the JS file, there are some issues I noticed line 5: const showCartButton = document.querySelector('.show-cart'); -- The show-cart class does not exist in the html; instead, try: const showCartButton =...
13 Mar 2024 by Pete O'Hanlon
This appears to be an issue using the CodeProject AI server. The discussion boards for this can be found here[^].
9 Mar 2024 by Modesty Zhang
Illuminate git internal on object model via a `git stash` implementation, including push, apply, pop, drop, list and clear, all with isomorphic-git
8 Mar 2024 by Patrice T
Quote: Let’s say we want some sensitive properties, in one of our data structures, to be encrypted but at the same time it’s key that information is still searchable by the right recipient and here lies the origin of our research. As far as I...
8 Mar 2024 by Pete O'Hanlon
As you have deduced, the database encryption SDK applies at the database itself. If you were looking to apply searching through OpenSearch or ElasticSearch, you wouldn't be able to search these fields there. If you're searching on the DynamoDB...
8 Mar 2024 by betoDavila86
For context, we are working in a SaaS product for clients (even from different companies in the future) to use it as a tool to integrate different AI services (custom and proprietaries) in a secured and controlled manner. Among many more, we have...
4 Mar 2024 by Pete O'Hanlon
You haven't shown anything in your code that relates to chatbot functionality. Let's assume that you know that you need both a client and a server in this scenario, then you need to think about how you want to handle messaging. The first thing...
3 Mar 2024 by slee.user12
constant msgerForm = get(".msger-inputarea"); constant msgerInput = get(".msger-input"); constant msgerChat = get(".msger-chat"); constant BOT_MSGS = [ "hello" ]; constant BOT_NAME = "BOT"; constant PERSON_NAME = "John"; ...
28 Feb 2024 by Bohdan Stupak
Creating distributed map-reduce workflow with AWS Step Function to write the poem that automatically re-generates itself
27 Feb 2024 by jespa007
A simple script engine for C++
26 Feb 2024 by Maksim Zemskov
How to utilize TypeScript for type-safe serialization and deserialization of data in JSON format
25 Feb 2024 by Computer Wiz99
I have a JavaScript code that I can't seem to get working. I am working with Model Driven App and trying to prepopulate some fields using JavaScript depending on the ID of that Table. One of field Data type is Whole number and the other is Single...
23 Feb 2024 by Zijian
Overcome the 53-bit limitation of number of JavaScript while keeping strongly typed integral types of .NET. Part 2.
23 Feb 2024 by Zijian
Overcome the 53-bit limitation of number of JavaScript while keeping strongly typed integral types of .NET. Part 1.
23 Feb 2024 by Pete O'Hanlon
Sorry to say but I don't think this is possible through standard means. I mean, you might be able to write an extension that traps the onclick event for the send, and then allows for the behaviour you want but, as this would have to go through...
22 Feb 2024 by greatwiccan
So I'm very new with Chrome Extension and I'd like to build one. I haven't done steps yet such as the manifestation, background, etc. But basically, this is about emails and its recipient. I want a pop-up alert when there are multiple...
18 Feb 2024 by Member 14967719
Isn't it about your reference to the question values? I am a bit unsure of your issue? Not sure if this would work, but can you use the "ABCD" values to reduce them to "1234" as the index to your "questions[pos]". Something like - userChoice:...
18 Feb 2024 by Member 14967719
Use ChatGPT to compare to two code sections and it will highlight that you haven't corrected all the initial problems in the original source code. It is one of ChatGPT's better functions as it isn't making up code, just comparing and working with...
17 Feb 2024 by Member 16204450
Why doesn't this script work? 600600 ◀
15 Feb 2024 by Member 16203518
I have basic knowledges in javascript. I would like to store data linked to object inside collection containing objects of the same type which : - stay in memory (not saved into a suport as harddrive, SSD, etc) - is not called as an array...
15 Feb 2024 by M-Badger
You should be able to do that using the UpdateContext function to create a context variable that tracks the status of the flow. In the OnSelect property of your Submit button: UpdateContext({conFlowComplete: YourFlow.Run(parameters).Success}) ...
15 Feb 2024 by Computer Wiz99
I am working in Power Apps and Power Automate. I have an import file element on my form. When a user imports a file and clicks on the submit button and flow is triggered. I am trying to hide the delete button on the imported file while the flow...
14 Feb 2024 by OriginalGriff
The error message is pretty clear: the file cannot be opened. Read the error message carefully: it says that it is trying to read a file "C:\Archivo_Descargas\WEGMANSPRODUCTION021624.xlsx" from Javascript code and cannot access it. That's...
14 Feb 2024 by Jarlis Antonio Pereira Aguilar
Hola tengo una mi consulta con un boton que dice descargar en excel..todo bien. pero yo quiero que esa informacion me la muestre en un hoja aparte del mismo archivo... y estoy usando agular como front este es mi codigo.. Google Translate: Hello,...
13 Feb 2024 by Richard Deeming
Because IDs in an HTML document are supposed to be unique, WebForms "mangles" the ID of any server-side control by combining it with the ID of every "naming container" in its hierarchy. If you can move to .NET 4.x, then you may be able to use...
13 Feb 2024 by OriginalGriff
Always start by reading the documentation: Document: getElementById() method - Web APIs | MDN[^] - it's pretty clear that it returns a null when the element with that ID doesn't exist: Quote: An Element object describing the DOM element object...
12 Feb 2024 by Member 7513082
How to get client id value of a asp.net control via JavaScript in JS file in content page and the JS file is referred from the same page. I am working in .net framework 3.5. I am fetching the client id value as below...
12 Feb 2024 by Nicholas Lombardi
I need to implement form validation for an online database of water wells. Part of the form relevant to my problem are two input type text elements. I attach onchange event handler and bind them to my script section at the bottom of the page...
8 Feb 2024 by OriginalGriff
I wouldn't recommend it: LocalStorage is pretty small: 5Mb per app per browser, so you aren't going to get a lot in there. Download to the client and let them store it locally, or stream it from your server. And bypassing school restrictions...
8 Feb 2024 by Richard Deeming
Perhaps you're looking for the File System API? File System API - Web APIs | MDN[^] However, if you're loading a "loose" HTML page from disk, rather than via a web server, this probably won't work. APIs like this tend to be restricted to...
8 Feb 2024 by cn77
basically im making this site thats running LOCALLY on your computer its a music player that you can drag mp3 files in and have them save to your device, and be able to play them with a cool UI. Its for school so thats why I want it, since all...
7 Feb 2024 by Richard Deeming
Unsurprisingly, the change event fires when the selected value is changed. It does not fire when the page first loads. You can either manually trigger the change event when the page loads: $('#programid').change(function() { ......
7 Feb 2024 by nyt1972
Hello, I have two dropdown boxes program and course, the program dropdown is populated programmatically and I want when it gets a value in other words when its value get changed then the course dropdown need to be populated based the program...
6 Feb 2024 by Richard Deeming
Quote: html += ''+data[i].course+''; Your generated HTML is invalid - you are adding the invalid attribute "option:selected" to your option element. The attribute is simply called...