Important: when posting, please provide your Club Number at a minimum, and as many details as possible.
For further info, please read This page before posting.

button onclick fails to call function

  • bgailer@gmail.com
  • bgailer@gmail.com's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 26
  • Thanks: 1

button onclick fails to call function

7 years 11 months ago
#68190
I added
Code:
<script>function foo3(){alert(313)}</script> <button onclick="foo3())">?</button>
to the Agenda Description.
Clicking the button just reloads the page!

I can invoke the function thru the web console.
I can set onclick="alert(313") and that works.
Why does the onclick fail?
Bob Gailer
Hillsborough Toastmasters Club 2968618
Windows 10
The topic has been locked.
  • Brian
  • Brian's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 11381
  • Thanks: 3727

Re: button onclick fails to call function

7 years 11 months ago
#68192
We are not here to solve your coding issues. We do not support forms or javascripts.
Thank you,

Brian McDonald DTM
Silver and Wiser Online Toastmasters Club #777940

Technical Support Consultant for FreeToastHost
The following user(s) said Thank You: bgailer@gmail.com
The topic has been locked.
  • bgailer@gmail.com
  • bgailer@gmail.com's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 26
  • Thanks: 1

Re: button onclick fails to call function

7 years 11 months ago
#68194
Based on your kind replies to some recent posts I took a chance and asked. I know you are not here to solve my coding issues. I did not see this as a coding issue, since I am doing essentially the same thing in a custom page where it works. So I surmise there is something in the Adenda Details invisible to me that is affecting the behavior. I will take another look at my code to see if there is a coding issue.
Bob Gailer
Hillsborough Toastmasters Club 2968618
Windows 10
The topic has been locked.
  • Brian
  • Brian's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 11381
  • Thanks: 3727

Re: button onclick fails to call function

7 years 11 months ago
#68195
Please don't play with agenda. It is not something we will be able to recover if it gets damaged. We will just have to remove the entire account and the club will have to start over from scratch.
Thank you,

Brian McDonald DTM
Silver and Wiser Online Toastmasters Club #777940

Technical Support Consultant for FreeToastHost
The topic has been locked.
  • SteveTheTechie
  • SteveTheTechie's Avatar
  • Offline
  • Emeritus
  • Emeritus
  • Posts: 11492
  • Thanks: 3057

Re: button onclick fails to call function

7 years 11 months ago
#68197
You have a syntax error in your posted javascript.

However, this is an example of why we do not want to be fixing user's javascript.
The topic has been locked.
Moderators: BrianHeniPamrhtaylor3marc33NotLiableNSBjgavinLcala305peterb323DebbieT
Time to create page: 0.145 seconds