Uncaught TypeError: Cannot read property 'style' of null
Résolu/Fermé
Nanashi17
Messages postés
193
Date d'inscription
mardi 28 mars 2017
Statut
Membre
Dernière intervention
19 juin 2017
-
29 mai 2017 à 11:55
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 - 29 mai 2017 à 15:23
Nanashi17 Messages postés 193 Date d'inscription mardi 28 mars 2017 Statut Membre Dernière intervention 19 juin 2017 - 29 mai 2017 à 15:23
A voir également:
- Cannot read properties of null (reading 'style')
- Typeerror: 'module' object is not callable ✓ - Forum Python
- Uncaught typeerror: cannot access offset of type string on string - Forum PHP
- Typeerror: can't multiply sequence by non-int of type 'float' - Forum Python
- Typeerror: 'int' object is not subscriptable - Forum Python
- Fatal error: uncaught typeerror: unsupported operand types: string + int ✓ - Forum PHP
2 réponses
Pitet
Messages postés
2826
Date d'inscription
lundi 11 février 2013
Statut
Membre
Dernière intervention
21 juillet 2022
526
29 mai 2017 à 12:14
29 mai 2017 à 12:14
Salut,
D'après le message d'erreur, la variable js launchBar serait égale à null, la fonction getDomObject() n'aurait donc pas réussi à récupérer l'élément html.
Quel est le code de la fonction getDomObject() ?
Comment est défini l'élément "launchBar" en html ?
Si l'élément lauchnBar possède un identifiant (<div id="launchBarDiv">), tu pourrais remplacer la fonction getDomObject() par un getElementById :
Bonne journée,
D'après le message d'erreur, la variable js launchBar serait égale à null, la fonction getDomObject() n'aurait donc pas réussi à récupérer l'élément html.
Quel est le code de la fonction getDomObject() ?
Comment est défini l'élément "launchBar" en html ?
Si l'élément lauchnBar possède un identifiant (<div id="launchBarDiv">), tu pourrais remplacer la fonction getDomObject() par un getElementById :
var launchBar = getElementById('launchBarDiv'); launchBar.style.visibility = "visible";
Bonne journée,
Modifié le 29 mai 2017 à 12:32
Et voici ma LaunchBar :
Et oui l'élément possède bien un <div id=\"launchBarDiv\"> que j'affiche dans une fonction avec echo