Topic: Trying to create an autocomplete on screen

dwilliams55555 free asked 3 months ago


*Expected behavior*I've copied the code directly from your example for the async autocomplete to one of my pages.

*Actual behavior*Uncaught ReferenceError: mdb is not defined

*_Resources (screenshots, code snippets etc.)_enter image description here](https://usercontent.mdbootstrap.com/mdb-images/support/e0e62652-91b4-40f5-8c52-de65f6383479-2024-02-01%2019_05_52-eclipse-workspace%20-%20applications_src_main_webapp__developerExamples_mosaicTagExa.jpg)*![enter image description here


Kamila Pieńkowska staff answered 2 months ago


Do you have package Essential or Advanced?

How are you doing your imports?


dwilliams55555 free commented 2 months ago

Using advanced. I've provided a screenshot of the imports. We're just including the javascript files. I didn't initially have the autocomplete file as I thought that it would be redundant, but added it while I've been working on this.


Kamila Pieńkowska staff commented 2 months ago

You do not need to add module import if you imported mdb.min.js

Where do you import the package in the head or in the body. Do you use any bundler? What you get in your console if you try console.log(mdb)?


dwilliams55555 free commented 2 months ago

This seems to be an issue of where on the page the scripts were being imported. I've corrected it and can use the example autocompletes now. Thanks.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 6.2.0
  • Device: hp
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No