Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Calling a function with params onclick - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
4y ago
•
4 replies
Jon
Calling a function with params onclick
I
'm trying to call a function with a param
. As i have it now the function gets called on load
, how can i make it wait for the user to click and still have my param
?
deletePostBtn.addEventListener("click", deletePost(baseURL))
deletePostBtn.addEventListener("click", deletePost(baseURL))
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
JS – Calling a PHP public function with vanilla javascript
KP-C
Kevin Powell - Community / front-end
16mo ago
Window.onclick
KP-C
Kevin Powell - Community / front-end
3y ago
declaring and calling a function in one line strangeness
KP-C
Kevin Powell - Community / front-end
4y ago
Accessing child properties when calling a function from its parent
KP-C
Kevin Powell - Community / front-end
4y ago