-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
in movies.mjs,
showMovieDetails() is not defined so we get a
Uncaught ReferenceError: showMovieDetails is not defined
onclick http://localhost:3000/:1so this would mean not only is it not defined anywhere, it's not available in the global scope when the user clicked on the Details button available from the movies.mjs file.
Do we,
function showMovieDetails(movieId) {
console.log("Movie ID:", movieId);
// your logic here
}window.showMovieDetails = function(id) {
// accessible from inline onclick now
};or something like
document.querySelectorAll('.btn-outline-primary').forEach(btn => {
btn.addEventListener('click', function() {
const movieId = this.getAttribute('data-movie-id');
showMovieDetails(movieId);
});
});
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Projects
Status
Todo