Skip to main content

All Questions

0 votes
1 answer
63 views

Javascript async click event issue

I'm bulding a website using Javascript to create some page transition effect to avoid reloading pages. The interface of the website is divided in 2 parts. The first part is the menu that is present in ...
Mathieu Préaud's user avatar
0 votes
0 answers
29 views

JavaScript Failing to Retrieve JSON Field Data from HTML and Execute SQL Query

I'm having trouble with my JavaScript code not properly retrieving and using data sent as JSON from an HTML form. Here's the process: A user enters a single or multiple addresses in an HTML form. The ...
Richy Chernov's user avatar
0 votes
1 answer
44 views

linking to an anchor on a dynamically generated page

I have some pages that are largely constructed from a data file using javascript when the page loads. I discovered that anchors constructed as part of this weren't being recognized by the browsers - ...
Gary Dale's user avatar
-1 votes
1 answer
379 views

How do I dynamically render data into a html table in react?

I'm trying to render a list of to-do items in a html table in react. I'm currently doing this by iterating through my database rows for each to-do item: todoLogs.forEach(todoLog => { ...
Toby Hogan's user avatar
1 vote
4 answers
1k views

How to prevent the page from loading until a script in the head with promises resolve

I have an external asynchronous script needs to finish executing before the page loads. To my understanding (from this thread), the default behaviour before the page starts to load is that it finishes ...
user8758206's user avatar
  • 2,201
1 vote
0 answers
37 views

JS Consistent Timeouts Between Browsers [duplicate]

I'm trying to make a timer that is consistent between browsers, but some users of my site have reported that the timer ticks down much faster in some browsers than others. Specifically, it seems like ...
CombustibleToast's user avatar
1 vote
0 answers
30 views

First option element wont work unless I select another option and then the first option will work

I have a select element that fetches a .json file from my local project folder that's stored into an array called "Books" = [ { "filename": "Genesis.json" "title&...
Omar M's user avatar
  • 19
-1 votes
1 answer
35 views

My If-Else statement won't work although it's completely fine

I posted a similar question, but it was taken down, put I still am very curious why something so trivial isn't working. This is all of my html/javascript... <!doctype html> <html lang="...
Adavis's user avatar
  • 19
0 votes
1 answer
47 views

why does async function behaves differently when using with addEventListener and calling it manually [duplicate]

I was trying to understand async and await keywords. I wrote a simple HTML file along with a JS file to demonstrate it. const promise1 = new Promise((resolve, reject) => { setTimeout(() => ...
Daniel Vanum's user avatar
1 vote
1 answer
147 views

Does a script with async attribute execute on a separate thread or the same thread as the HTML parser in JavaScript?

using defer or async attribute on a script tag causes it to be downloaded on a separate thread so that HTML parsing is not blocked. But once the script is downloaded, for async attribute, it will ...
Urooj's user avatar
  • 354
2 votes
0 answers
142 views

Asynchronous Ajax Calls giving "Caution: request is not finished yet in chrome" when performing operation in Partial View Page

I have a HistoryController.cs, index.cshtml , some javascript code and three partial views. In index.cshtml I have three partial views in the form of tablist which are hidden at first. When I click a ...
rohan's user avatar
  • 81
1 vote
1 answer
69 views

How do I add a delay to a script tag that includes params?

I would like to add a delay for this code including the async and the data attributes. <script async src="https://s.widgetwhats.com/wwwa.js" data-wwwa="1"></script> I ...
Uri Gross's user avatar
  • 524
1 vote
3 answers
2k views

Uncaught (In Promise) error while using setTimeout() to Reject a promise in JavaScript

I am learning promises in javascript and I decided to implement a simple promise where I would set a timeout of 3 seconds and then reject the promise. Upon rejecting it, I am catching the error and ...
Satyam Rai's user avatar
0 votes
2 answers
999 views

Updating a <progress> element works in Chrome but not in Safari

I'm trying to update a progress bar from within an async function. The following snippet of code works for me in Chrome but not in Safari: <!DOCTYPE html> <html> <body> <...
Jay Mody's user avatar
  • 4,083
0 votes
1 answer
151 views

Button changes text to "[object promise]" on click. How do I stop that?

I am trying to call a table from a json file when clicking a button, and that is working fine. But when I click the button, it changes the text inside the button to "[object Promise]". I do ...
Therese's user avatar

15 30 50 per page
1
2 3 4 5
22