Uncaught ReferenceError: loadCarPage is not defined onclick http://127.0.0.1:5500/index.html:1
Can anyone help me with debugging the above error message? while creating a 3d car portfolio website on my laptop. #front-end
5 Replies
If using modules (
type="module"
) variables and functions do not get put on the window object.
If you have a normal <script>
and put function test(){..}
there, you can call it via window.test()
, because it is put there. That does not happen in modules, you have to do this explicitly, for example:
Many thanks, let me try it now
i omitted scene.bin because it's 63MB but it's yet to really display on my browser. please, check the rest files if am doing the right thing
the link to the scene.bin is below here: https://sketchfab.com/3d-models/free-1972-datsun-240k-gt-b2303a552b444e5b8637fdf5169b41cb
Karol Miklas
Sketchfab
(FREE) 1972 Datsun 240k GT - Download Free 3D model by Karol Miklas...
1972 Datsun 240k GT
Modelled in Blender in 2012, renewed in 2017 to match current Sketchfab viewer
Textures and materials might need to be applied manually. - (FREE) 1972 Datsun 240k GT - Download Free 3D model by Karol Miklas (@karolmiklas)
i appreciate your answer but kindly check my uploaded files if you can help me debug it