0

When I run below code in my system runs fine,but I try to run sololearn not running

https://code.sololearn.com/W9o4O92S7J7I/?ref=app Onclick(edit(this)) not running don't know why please explain

19th Nov 2021, 6:31 AM
Gajjala Venkata Sai Sri Harsha Hanumantha Rao
Gajjala Venkata Sai Sri Harsha Hanumantha Rao - avatar
3 Réponses
+ 1
Try to move edit(), remove() and done() function out of window.onload handler. Put them before the window.onload handler.
19th Nov 2021, 7:04 AM
Ipang
+ 1
Ipang thanks it worked
19th Nov 2021, 7:12 AM
Gajjala Venkata Sai Sri Harsha Hanumantha Rao
Gajjala Venkata Sai Sri Harsha Hanumantha Rao - avatar
0
Alternatively, you can opt to keep the edit(), remove() and done() functions inside the window.onload handler by assigning the functions into local identifiers. edit = function(e) ... remove = function(e) ... done = function(e) ... You can use arrow functions to do that also ...
19th Nov 2021, 7:20 AM
Ipang