Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

javascript

  1. edwardsmarkf

    JavaScript using "import from" dynamically

    hello - i have used the following syntax a number of times with much success: let script = document.createElement('script') ; script.src = '/js/myJavaScript.js' ; script.type = 'text/javascript' ...
  2. Y

    JavaScript Find The Length Of A String

    Hi, I've just started to learn JavaScript, being a beginner. In order to qualify myself for the proper boot camp, I must do a kind of online course first and pass some challenges. I've got a bit stack in a very simple situation. My problem is: Create a new variable called stringLength. Use...
  3. J

    JavaScript How to select area value from geojson using javascript

    I'm trying to right a javascript function that selects a polygon based on area value. The criterea is to select largest value if the heighest area value of a feature collection plygons is <= 20. Else, if the smalest area value a feature collection plygons is > 20, to select the smallest value...
  4. jaredcb

    JavaScript Getting the sum of equal array elements, and creating a new array

    I'm scratching my head over this one. Not sure if I'm asking this question wrong, but I'm trying to reach out where I can hopefully find someone who knows what I can try. I tried asking this on another forum, and they didn't like that I didn't have any example of failed code yet, so they...
  5. Q

    Can Anyone Help With Repairing The Bug In This Code?

    I have set myself the task of trying to effectively diagnose a Bug in this piece of code, which has been written in JavaScript. the problem. How does a coder who has just started to learn coding, use 'variable watching', 'compiler warnings' and a 'unit test' for this objective? Here is the piece...
  6. P

    JavaScript How to push onto browser history

    I am trying to push a URL onto a browser history to "prevent" the back button from going back to the previous page. Currently if the user clicks the back button, they simply go back to the Feedback page with the Submit button in a disabled state, which, while it prevents the user from flooding...
  7. C

    Saving dropdown options to server

    So far, I have the following code: <!DOCTYPE html> <html> <head> <title>Company HR</title> <style> h1 { font-family: verdana; text-align: center; font-size: 50px; } table, th, td, select { border: 1px solid black...
  8. speedychapo

    JavaScript Javascript code works more than once

    Hello everyone, I will try to explain briefly but not sure I can do that or not. When I click on the edit button, a modal page appears on the screen. Inside this modal, there is is_index_sample_edit button. Clicking the X symbol(not refresh the page) in the upper right corner closes the edit...
  9. A

    JavaScript Call several times a javascript on the same page

    hey guy I'm working a MCQ and would like to have random number to be display for my question and my answers. basicaly, I have 12 names assign to 12 numbers and I have to choose in 5 answers which one is the correct one. First question is working because, it is the fisrt time it is called but...
  10. J

    JavaScript Javascript: Password Generator - I need help.

    Hello, learning JavaScript for the first time and I am completely stuck at trying to figure out one of my first exercises. It is password generator. I have the HTML, CSS set up. but my javascript code just isnt working for me. Any help would be very appreciated. The critia: Once you have been...
  11. F

    JavaScript Why is my gltf-animations not playing? (Javascript & Three.js)

    //gltf-object const loader = new GLTFLoader(); loader.load('stegosaurs_SStenops.glb', (gltf) => { gltf.scene.position.set(0, 40, 130); gltf.scene.visible = true; scene.add(gltf.scene); // Animation; let mixer = new AnimationMixer(gltf.scene); mixer = new...
  12. G

    JavaScript Problem running JavaScript code on Apple devices

    The goal is to execute a function when a button with the class .more is clicked. However, after modifying the code to troubleshoot the issue, none of the event handlers are working on Apple. The following code runs without any problems on Android (Chrome & Firefox) and on Windows (Chrome & Edge)...
  13. T

    HTML & CSS jQuery Generated Variable Not Passing to CSS Keyframe Animation on Safari

    I have a CSS keyframe animation that uses a CSS variable as one of the animation properties. This variable is defined in jQuery. The entire animation seems to work fine in Chrome and Firefox. However, in Safari and on mobile browsers, only the portions of the animation not using the variable...
  14. L

    JavaScript Recursively Delete objects from an array of nested objects

    Anyone know how to recursively find and delete an object from an array structured like this with infinite nested objects with the same structure? [ { id: 1, nest: [ { id: 2, nest: [{id: 3, nest: [{..continues..}]}], }, { id: 4, nest...
  15. choudhmh

    JavaScript Need help with SQL / javascript

    Good day Writing this code there one of the database field is vote - within the javascript i have this parameter called increment votes. When any number is passed through the parameter the votes for that id within the table must be increased by the the parameter amount (or decrease). Got...
  16. F

    JavaScript Canva drawing Javascript on elementor

    Hello everyone, I wanted to implement an interactive drawing on my wordpress using the HTML element. The code works well outside of wordpress but once implemented, the mouse is movement seems off ( it is far away from the cursor). Any idea why that is ? Here is the page where i want to...
  17. S

    JavaScript Replacing Ace editor with summernote editor - 'Save' button

    Greetings, I'm working with an unsupported PHP/MySQL CMS that for some reason uses the Ace editor for adding/editing page content, and I'm trying to convert this over to use the summernote WYSIWYG editor. I've successfully replaced the editor, but unable to get the "Save" button to work because...
  18. Outl1er

    JavaScript Can't get mousePressed to work the way I want, p5js

    Trying to make buttons that when I click them they change the colors, but at current the buttons activate when I hover over them and clicking does nothing. https://editor.p5js.org/rwarner/sketches/3CAVfPgzL
  19. sam-the-tutor

    JavaScript Javascript Error

    I need help on this task. I have tried it but failed. Thanks in advance
  20. Idle Commander - The Dev

    JavaScript Cannot read properties of null style

    I have this code all the ids in HTML exist. ``` const materials = [ { name: 'stone_box', amount: stoneAmt }, { name: 'redMushSeeds', amount: redMushSd }, { name: 'cop_box', amount: copperAmt...
Back
Top Bottom