+ 4
JavaScript: condition on line 52 doesn't work in code though it doest out of code. Anyone who is good at JavaScript?Nobody know?
Test it on jsbin here on solo it doesn't work. The problem is that when a reply button is clicked it must add some text in block with id=aname and then if the tag contains that text run the code but it doesn't work in this code despite if u take out that bit of the hole code it work pretty well. https://code.sololearn.com/WWZJnxEl17EK/?ref=app
8 Answers
+ 3
My bad I meant add the code with changes I was referring to in my reply đ
đ€Šââïž
https://code.sololearn.com/WpiSiXyh1QEz
+ 2
Million thanks to u man. Ur the best.
+ 1
Are you running the code in SoloLearn Android app? if so, then the error message about localstorage was shown because web storage is not available in the app. It's an issue related to WebView.
+ 1
localStorage is not restricted on SoloLearn
+ 1
Instead of checking if the comment is a reply at line 52, it should be done in the click handler that starts on line 9 by doing so you can add a flag to the comment object indicating if the comment is a reply to a previous comment.
You will also need to change line 52 to check if item.isReply is true or false.
edit:
https://code.sololearn.com/WpiSiXyh1QEz
+ 1
Yeah, it seems to be it overriding the facus of oncklick or something like that have to read about it a littlebit.
0
Then why it shows error here on solo learn?
0
Here, sololearn is denying the access to localstorage.
It's also written the error.