Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

javascript

  1. K

    JavaScript Kamal Hinduja : What is the event loop and how does it work?

    Hi, I am Kamal Hinduja based Geneva, Switzerland(Swiss). can anyone explain What is the event loop and how does it work? Thanks, Regards Kamal Hinduja Geneva, Switzerland
  2. P

    JavaScript fetch() constantly returns Promise object, should return Number or String

    I have no idea why this is happening, but every single time I run this simple function that fetches URL content and expect a String or Number, I get a Promise object, and I can't figure out why. /** * Options object based on...
  3. P

    JavaScript Using Javascript fetch() to determine if URL is "good" or "bad"

    I wrote a simple CMA that displays database information that includes various URLs displayed on my website that is managed by my CMA. The URLs display just fine, and all is well, however, what if that URL goes "bad"? What if the URL returns a 403, 404, or even a 0, if you click onto the URL from...
  4. P

    React custom hook function constantly returns null

    I have a multi-use React Hook function, useGetData({url}), that takes a url, does a Fetch API, then returns the resulting JSON array string for further processing in other functions and components. However, useGetData({url}) constantly returns null every time, no matter what I do. import {...
  5. P

    How to return HTML into component without using <div> tag

    I have a page that uses CSS, namely Bootstrap, for design and styling, and extra <DIV> tags can affect the page's look-and-feel, so I want to return HTML from a React function inside a component without having to use a <div> tag: import React from 'react'; import DOMPurify from 'dompurify'...
  6. P

    Cannot read properties of 'undefined': 'props'

    I am trying to write a very simple React standalone function that will take a URL as a parameter and return the fetched HTML as a result to the parent component. Here is my code: import { useEffect, useState } from 'react'; const GetData = ({ props }) => { const [html, setHtml] =...
  7. s-qaiser

    How to add .js and .html files to ionic/android studio for android apk deployment

    Hello, I have been struggling for the past two days, trying to convert my .js (interactivity) and .html (CSS and elements) files to an Android app. My code works fine and runs smoothly when it's in my browser, but I am unable to get the two files into Ionic/Visual Studio. I tried putting them...
  8. P

    JavaScript jQuery: G[o].exec is not a function

    Upon using jQuery (jQuery 3.6.0.min.js) I am getting the strangest error in my console, but it never shows me the full stack trace of the error. Can someone help? This is affecting my web portal functionality:
  9. H

    JavaScript How to set an initial value to PlaceAutocompleteElement

    I am creating an autocomplete address input element via google.maps.places.PlaceAutocompleteElement, to let users autocomplete addresses. The thing is that users have previously saved their address in our database, so I need to set the PlaceAutocompleteElement input an initial address value...
  10. N

    (Nodejs) Trying to read a file but not getting the output I expect

    I am learning nodejs and I am just getting my feet wet with it. For practice I am trying to read 2048 bytes from a file then put it in a buffer and repeating until I have read the whole file. In the code I print out 'hello' in the readmyFile function. I do see that repeatedly but I do not...
  11. H

    JavaScript Grey background on IOS when clicking

    Hello there!! When I click on an absolute positioned div on IOS (Safari), there is a flash of a grey background. This is a video the example: Screen Recording 2025-04-10 at 09.23.30.mov And this is a code pen with the example code: https://codepen.io/hebrerillo/pen/RNwzKXx However, if the...
  12. JosiahMaybe

    Is it worth using package managers and repos for this open source?

    Hello, I have StinomXE, my website gets like 5,000 page views a month total and is not very web searchable, mostly direct traffic, I am thinking of making for package managers what I should, one for Swift, one for Rust, one for Go, and maybe some Codeberg repos. At least those 3 mentioned...
  13. M

    JavaScript How to send a div to the Windows Print Dialog at the correct scale for A1/A4 etc.

    I have a div that displays user-edited content ready to be sent to the Windows Print Dialog for printing. The content contains images and text at a width of 7016px, which is the width of A1 at 300dpi. I have a button to print at A1 and a button to print at A4. The A4 button changes the width to...
  14. J

    JavaScript Background bogging up and down

    When I delete hit_top variable in script.js and roomEffects.js that is sent into the function, then the background scrolls upwards as it should. But without the hit_top variable, how can I tell the program that the background has already been to the top of the screen? It should look like a...
  15. Alaskatron

    JavaScript Undesirable throttle point resulting from my Javascript, but the reason for it is the mystery … !???

    <initial> ... Main Site (sandbox) —> https://richnutcoffee.net/basic4/cStore.php … JS direct —> https://richnutcoffee.net/basic4/cStore.js . … Specific in ‘ cStore.js ‘ file … lines 21-49 —> function rotateCarousel() <— . </initial> I have written code that I am lacking a deeper...
  16. J

    JavaScript Can someone pls help me with a little algorithm script

    hey there community, just signed up because i’m trying all day to create a script in HTML/JS with ChatGPT. It works quite a bit already but can’t tune it the way I need it. here is what I’m trying to create, a text generator which follows these rules: -the string (Z) persists of a 3 random...
  17. onur_super_ai

    JavaScript Google drive pictures are not showed in website

    Hello, I am new to javascript coding. I am displaying the table in the google sheet on the web with js. It pulls the data properly, but my pictures in google drive cannot be displayed properly in the last column in the table. When I get a link to any image on the internet, the image appears, but...
  18. R

    Using PHP to convert JSON string to JS Object

    Friends, I'm very new to this stuff, so please ignore any mistakes I might make, but I would really appreciate some help here. I'm sending out a very simple form post to: https://click2call.aosystemsgroup.com/wcb.php?i=1 which works great. I would like to convert the returned JSON, which is...
  19. H

    JavaScript Break on input value changes

    Hello everyone! I want to know if it is possible to set a breakpoint, using the browser, when the value of an input field changes. In Chrome, I can set a breakpoint on a DOM element in these scenarios: Subtree modifications Attributes modifications Node Removal I need a similar way to...
  20. H

    JavaScript Check if input can be focused

    Hello everyone! I want to know if there is a way to check if an input is focusable or not via JavaScript. I am implementing a form, and when the user hits the enter key, the focus should go to the next "focusable" input via JavaScript. The problem is that some inputs are hidden via...
Back
Top Bottom