javascript

  1. jsmwrench

    NOOB assistance - send command from web page to Pi

    Hi all. I'm pretty much a NOOB to this, but I have dabbled in C++ and HTML/CSS and I've also programmed some Arduino projects. This project, however, is larger than my experience, but I believe I can get through this if I just take one step at a time. To explain my project as simply as possible...
  2. Idle Commander - The Dev

    JavaScript Why is my first test good then my second goes bonkers

    I have this battle game and the first time you click battle it goes really smooth and well and does everything needed but once I clicked the button again there is supposed to be a 3-4 second gap between all the attacks to each other but it does something like this (1 _ is a second an "at" is an...
  3. parvinder21

    Node.JS Error: Cannot find module 'puppeteer'

    const automation = require("puppeteer"); const fs = require("fs"); const automationConfiguration = { headless: false } async function runautomation() { const browser = await automation.launch(automationConfiguration) const page = await browser.newPage() const navigationPromise =...
  4. abidiziko99

    JavaScript Javascript / Node.js importing html file

    I'm making a node.js server which sends emails on demand. The variable "output" is what I want to send via email. When I use inline html it works fine, however I want to import a complete html file instead. const { EmailClient } = require("@azure/communication-email"); const connectionString =...
  5. abidiziko99

    JavaScript How to send bulk email using javascript by azure ACS

    How to send bulk email using javascript by Azure Communication Services const { EmailClient } = require("@azure/communication-email"); const connectionString = `endpoint=${endpoint}/;accesskey=xxxxxxxxxxxxxxxxxxxxxxx`; const client = new EmailClient(connectionString); const sender =...
  6. A

    JavaScript Closing a window outside as well

    Hi: I am opening a window and closing a window with style.width. I like to close the window with clicking on the body outside the window as well when the window is opened. In https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_modal it does. I am trying to achieve the same task...
  7. Idle Commander - The Dev

    JavaScript My code is not working

    Go to this link (there is too much code to paste). Gem Hunt 2 (inspect the page for HTML and css). and go to the quests tab and click on Fred the crafter speed through the obviously correct ones then when you get to “ALright I have unlocked it for you go craft a stoen furnace and come back.” and...
  8. E

    Autoclick print button goes into a loop

    Hi, could you help me please? From a Chrome extension I would like to autoclick on print confirmation ("button confirm"), but this script partially works, as the page refreshes endlessly in a loop. setTimeout(function() { labels = document.querySelectorAll('label'); if (labels[1].innerText...
  9. B

    JavaScript I couldn't solve the javascript questions. Can you help me?

    Question 1 : How to rewrite the method foo() const someText = 'some string'; function foo(){ if(someText.indexOf('string')!=-1){ return true } return false } a - someText.includes('string') b - someText.endsWith('string') c - someText.repeat(5) Question 2: In...
  10. cno

    JavaScript Sales Data in an Array - Javascript

    I need some help please, I have a sales data for a couple of years and i want to retrieve the below information using Javascript: -The total number of months included in the dataset. - The net total amount of Profit/Losses over the entire period. - The average of the changes in Profit/Losses...
  11. OhNoItsA8

    JavaScript Smoother JS Sprite Movement

    I'm in the process of making a simple, 2D racing game. I have some code that works to move the car with the arrows, but it isn't very smooth. Once it gets to the end of the page, it scrolls as the car moves, and it's very shaky to the point where it hurts to watch. If you want to see what I...
  12. SpongeBOB

    HTML & CSS Input field like this one on the forum for the tags.

    Hi everyone, How can I make simply an ~input field that work like the one on this very forum ? --> Without any extra add-on (like JSquery etc.. just CSS, HTML, or Regular Javascript. Thanks.
  13. Idle Commander - The Dev

    JavaScript How do I do something to the body while a popup is showing

    Well, there is a little bit of javascript in here but when a popup in my game shows I want to disable all other things on the screen and make them not respond and create a little tint over everything but the popup. And when the user closes the popup everything resumes. I have no idea I tried to...
  14. ShwetankJoshi

    JavaScript facing the issue in creating the JS function that will add the price of each item and give the total amount at the last row of the table.

    Creating a Invoice maker website using HTML , CSS and JS , which is my clg mini project , i hava to create a JS funcition that will multiply the unit cost and quantity to give price and another function that will give the total of the price of each item at last row of the table. the refrence...
  15. N

    JavaScript How do I track item lists for future IF statement

    Still working on the same issue posted https://codeforum.org/threads/better-than-a-long-list-of-if-statements.5571 However, the solution provided on that thread does not work (I think it's because) it's an old Rhino JS compiler (I was told). So, nothing fancy on the suggestions. Thank you. I...
  16. P

    JavaScript How do I loop through an array and display each item in the HTML page on a new line?

    Hi, I am new to JS from Python. I am trying to create a To Do List in JS, and I am trying to loop over an array that contains the added items. I want each item in the array to appear on a new line in the web app. The best I can get is for the items to be displayed like this item1,item2,item3 I...
  17. RedWinter

    JavaScript Need Help to Debug my Code. My problem is that my longitude and latitude becomes undefined when i call them in position function.

    var ref = firebase.database().ref('Location/Lat'); var latitude; var longitude; ref.on("value", function(snapshot) { console.log(snapshot.val()); latitude = snapshot.val().Latitude; longitude = snapshot.val().Longitude; console.log(latitude, longitude)...
  18. TimDang

    JavaScript How to play streaming Audio with webSocket

    I try to play a streaming audio from webSocket, the data returned about playload is base64 and sequance Number of playload. I can play the audio with my code but the sound is very bad. I think my code is the cause of the bad sound, I want the quality of sound better. How can i do? Thank...
  19. udayasl

    JavaScript Fire javascript on infinitely loading page

    I have a simple chat script which continuously updates an HTML page with messages. So the HTML page is infinitely loading and never reaches </body> </html> and the browser also waits till the end (that's the normal behaviour of it to update the chat with latest messages). Now I'm going to add...
  20. A

    Support science and help your favorite charity by participating in a short online experiment.

    Hi We are researchers from the University of Zurich, Switzerland, and developed a web application experiment for investigating ways to improve code review. If you have javascript knowledge, please help us in this 20 – 30 minutes experiment by using the desktop version of a browser...
Top