cannot access " " before initialization - Druckversion +- Javascript-forum (https://javascript-forum.de) +-- Forum: Entwicklung (https://javascript-forum.de/forumdisplay.php?fid=4) +--- Forum: Javascript (https://javascript-forum.de/forumdisplay.php?fid=6) +--- Thema: cannot access " " before initialization (/showthread.php?tid=523) |
cannot access " " before initialization - wnkng - 20.04.2022 Code: <!DOCTYPE html> Ich bin relativ neu Ich möchte einer Qr-Code Scanner programmieren der ein Passwort aus dem Qr-Code liest. irgendwie funktionieren var und let nicht. Bei let steht in der Konsole "cannot access "position" before initialization" und bei var ist jeder Qr-Code richtig. Danke für jede Antwort RE: cannot access " " before initialization - admin - 20.04.2022 Hast du mal zufällig so ein qr Code Bild da? Will das mal selber testen. Würde es aber so versuchen Code: <!DOCTYPE html> RE: cannot access " " before initialization - wnkng - 20.04.2022 Danke! QR-Code: https://ibb.co/sVgnKrr Mir ist aufgefallen dass der Code zur Webseite der API weiterleitet. Kann man das irgendwie lösen z.B. das die vorherige Seite wieder geöffnet wird? RE: cannot access " " before initialization - admin - 20.04.2022 Ich habe mal einen kompletten Scanner zusammen gebaut mit einem QR-Code. Hier das Bild , mit dem Code 12345 Wenn du das dann Scannst sollte ein Alert kommen mit Code richtig.Chau dir das mal einfach an RE: cannot access " " before initialization - admin - 20.04.2022 Zitat:Mir ist aufgefallen dass der Code zur Webseite der API weiterleitet. Kann man das irgendwie lösen z.B. das die vorherige Seite wieder geöffnet wird? Das liegt an den action="http://api.qrserver.com/v1/read-qr-code/" attributte RE: cannot access " " before initialization - wnkng - 20.04.2022 Wow! Vielen Dank RE: cannot access " " before initialization - admin - 20.04.2022 Funktioniert es bei dir wie gewollt? RE: cannot access " " before initialization - wnkng - 21.04.2022 Ja! Perfekt |