Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
128 views

Error 404 appear in console browser when execute JS script

I have an issue with my Javascript script that loads data for my website. My site is hosted on my local PC, as well as the API I use. The website is not intended to be deployed online as it is a study ...
Hekynox's user avatar
3 votes
1 answer
4k views

How to enable CORS in FastAPI for local HTML file loaded via a file:/// URL?

I am trying to enable CORS in FastAPI on my localhost with credentials enabled. According to the docs we must explicitly set allow_origins in this case: from fastapi import FastAPI from fastapi....
Speech-To-Text.Cloud's user avatar
1 vote
0 answers
26 views

using built-in local storage object:not getting null in the output when using remove

I wrote a program for rock, paper, scissors with 4 buttons one extra for resetting. I wrote two functions one for computer move and one for player move. Along with that, it updates the wins, losses, ...
Manasa's user avatar
  • 11
0 votes
0 answers
38 views

Why can I import a script file from a local directory but I can't when the type is a module? [duplicate]

Let's say you create a project folder named 'project' in your desktop and inside of it a simple index.html file. Now, you want to create a script and so to not polute your index.html, you code your ...
Gabriel Andrade's user avatar
0 votes
0 answers
57 views

(in js) reading the contents of a local text file into a string [duplicate]

(after 20 hours of failing with the many clever code snippets already posted on Stack Overflow, as a js beginner .. ) my project needs a conceptually simple js function, something like: var sOut = ''; ...
Richard Cramer's user avatar
3 votes
3 answers
8k views

Referencing local files from HTML in Android

I have a very simple HTML app with uses a couple of js files, a css and several images. I have all of them bundled on a folder that I downloaded to my mobile phone in the Downloads folder. Now, when I ...
Bardo's user avatar
  • 2,523
0 votes
2 answers
904 views

Problem with Hcaptcha and iframe browser restriction

I'm working on a local javascript application that interact with a server in ajax and I want to securize my creation form with hcaptcha. <script src='https://js.hcaptcha.com/1/api.js' async defer&...
cellendhyll's user avatar
0 votes
0 answers
92 views

In React Native, why does this not work? I just want to save and use these two valuse in a local storage, but one works, but the other doesn't work

Just like the title says, I want to save two values into a local storage with AsyncStorage. My app is quite simple. There are two buttons that increment each of the numbers by pressing them. They're ...
sahasrabhuja neuron's user avatar
0 votes
1 answer
1k views

In react native, I'm trying to save an object in AsyncStorage, but my app throws an error

I just want to save a simple object into a local storage using AsyncStorage, but my app throws an error saying "[SyntaxError: JSON Parse error: Unexpected identifier "object"]" ...
sahasrabhuja neuron's user avatar
0 votes
1 answer
3k views

Failed to open TCP connection to localhost:3002

I'm running a ruby server on docker, that tries to call a node API running on a different port. ruby - 3000 node - 3002 I'm trying to call locally to this URL (to the ruby app to my node API) : ...
IndieShlezz's user avatar
0 votes
0 answers
44 views

local storage loses property when submit a form

I'm working on a toDo project with local storage. When i try do update the local storage it works perfectly. But after pressing the submit button and the page is reloading the data gets lost. I'm ...
Sandy's user avatar
  • 7
0 votes
0 answers
27 views

Why won't my code save object to local storage? [duplicate]

Trying to create a flashcard app with cards made using user input and then saved into local storage so it can be accessed even after refreshing. const newBtn = document.getElementById("newBtn&...
Rizztek's user avatar
-1 votes
3 answers
938 views

Can a Javascript function level const variable take on a different value each time the function is called?

I'm trying to find out if my use of 'const' is appropriate given the behavior I am seeing. function showInstructions() { const againText = (clickCounter > 0) ? "again " : ""...
KeyboardJockey95's user avatar
-1 votes
2 answers
2k views

Is it possible to search the contents of html files from another html page all within the same local directory?

So if given an offline webapp made up of html5/css/js with standard directories of {[Main Folder] > 0001.html, 0002.html, 0003.html, {[assets folder] > [css],[js],[media]}} is it possible for a ...
SweatersInSummer's user avatar
1 vote
1 answer
3k views

How can I backup and load my local storage in chrome?

How can I backup and load my local storage in chrome? I'm playing some HTML5 games which could only run in chrome, they depend on local storage to save data, no account or save code. But I also need ...
Cflowe Visit's user avatar

15 30 50 per page
1
2 3 4 5
26