button's function call not working.
See original GitHub issueMeta info
- Seems to be a bug:
- Version (3.6.2): The version is no longer displayed in the help section.
- Context - Chrome extension:
Greetings,
<button onclick="CallFunction()">Click me</button>
Does not seem call the function.
The CSS panel recognizes the button and can be styled and reacts like an active button is programed to do except for implementing the HTML portion of the code.
Entering the code without a function call does implement the code. (See example below.)
Other variations such as:
<button onclick="Alert()">Click me </button>
or
<button onclick="counter=counter + 1">Click me </button>
similarly, do not run the requested code.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Button onclick not calling function - javascript - Stack Overflow
Try to put function inside the <head> section of the page and if worked, The problem is wrong path to js file. Share....
Read more >Not being able to call a javascript function through a button
The code in my solution works absolutely fine. If it's "not working" for you, then you need to provide a meaningful description of...
Read more >onclick Event - W3Schools
Execute a JavaScript when a button is clicked: <button onclick="myFunction()">Click me</button>. Try it Yourself ». More examples below.
Read more >How can I call a function from a custom button in - ServiceNow
Solved: Hi, I have a UI script that adds a button next to user info dropdown on the header of the admin page....
Read more >HTML Button onclick – JavaScript Click Event Tutorial
In JavaScript, you invoke a function by calling its name, then you put a parenthesis after the function identifier (the name).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Pleased to report, this issue was resolved in the newer version ( 4.0 )
As you have already noticed, your code will work inside the Web app. But not in Chrome extension due to security restrictions in browser extensions. In chrome extension, in the HTML panes you can write JavaScript or use event attributes like
onclick
etc.