","upvoteCount":9},{"@type":"Answer","text":"Hi Graeme Adamson, you forgot to put parenthesis there, in the button tag attribute, instead of \"prsbtn1\", you need to use \"prsbtn1() \"","upvoteCount":2},{"@type":"Answer","text":"https://code.sololearn.com/Ww5dySCE2cfJ/?ref=app","upvoteCount":1},{"@type":"Answer","text":"Thanks got it sorted. I will try to be more careful.","upvoteCount":1},{"@type":"Answer","text":"Got it sorted it a beginners error. Thanks","upvoteCount":1}]} }
+ 1

How do i get an onclick event to work on an Android tablet

I am trying to get an onclick event to work but on a tablet in sololearn does not work.

3rd Sep 2020, 10:33 AM
Graeme Adamson
7 Answers
+ 9
Show your code so that we can help
3rd Sep 2020, 10:35 AM
Harsh
Harsh - avatar
+ 9
To make button work you have to define function Ex- <button onclick="hello()">click me</button> <script> function hello(){ alert("please define function") } </script>
3rd Sep 2020, 10:53 AM
Harsh
Harsh - avatar
+ 2
Hi Graeme Adamson, you forgot to put parenthesis there, in the button tag attribute, instead of "prsbtn1", you need to use "prsbtn1() "
3rd Sep 2020, 7:11 PM
Hitesh Datt
Hitesh Datt - avatar
3rd Sep 2020, 10:40 AM
Graeme Adamson
+ 1
Thanks got it sorted. I will try to be more careful.
8th Sep 2020, 10:26 AM
Graeme Adamson
+ 1
Got it sorted it a beginners error. Thanks
8th Sep 2020, 10:30 AM
Graeme Adamson