+ 6

Why am I not getting the html output in console?[Solved with axios]

https://code.sololearn.com/W92TXQXq4Wxx/?ref=app

4th Dec 2020, 3:18 AM
Jeremy Cruz
Jeremy Cruz - avatar
37 Answers
4th Dec 2020, 11:06 AM
Krish
Krish - avatar
4th Dec 2020, 3:39 AM
Coder Kay
Coder Kay - avatar
+ 8
OK make it. It's easy
4th Dec 2020, 3:47 AM
Coder Kay
Coder Kay - avatar
+ 7
Jeremy Cruz You are trying to access/fetch the link which is blocked from the origin! 𝕂𝕒𝕪 try to right the sentences in one line! You are breaking even one answer in 7-8 parts Hope you both understand 👍
4th Dec 2020, 5:52 AM
Piyush
Piyush - avatar
4th Dec 2020, 3:29 AM
Coder Kay
Coder Kay - avatar
+ 5
What do you want? 🤨
4th Dec 2020, 3:32 AM
Coder Kay
Coder Kay - avatar
+ 4
In sololearn there's some limits
4th Dec 2020, 3:40 AM
Coder Kay
Coder Kay - avatar
4th Dec 2020, 3:56 AM
Coder Kay
Coder Kay - avatar
+ 3
Krish but it's a little strange, I mean, a few days ago I tried to use the 'add.EventListener' in my code, but it didn't work, Why?, idk, but it told me that the 'Event' was "property of null", so I fixed in my HTML, but if you said that, then I'll try it another occasion.
6th Dec 2020, 8:42 PM
Ariel 983
Ariel 983 - avatar
+ 3
Krish Oks, thank u very much. I'll try it so.
7th Dec 2020, 11:40 AM
Ariel 983
Ariel 983 - avatar
+ 2
Then use source code viewer app
4th Dec 2020, 3:36 AM
Coder Kay
Coder Kay - avatar
+ 2
Oh OK
4th Dec 2020, 3:36 AM
Coder Kay
Coder Kay - avatar
+ 2
what do you want to make
4th Dec 2020, 3:42 AM
Coder Kay
Coder Kay - avatar
+ 2
I think the 'add.EventListener' does not function in the Solo Learn JavaScript idkw, but I think if you try it on the html you could make it run.
5th Dec 2020, 9:11 PM
Ariel 983
Ariel 983 - avatar
+ 2
AAriel 983 addEventListener works in SL JavaScript tab
6th Dec 2020, 3:46 AM
Krish
Krish - avatar
+ 2
Jeremy Cruz just cover your JavaScript with ``` window.onload = () => { // Your code goes here } ```
6th Dec 2020, 3:49 AM
Krish
Krish - avatar
+ 2
Jeremy Cruz it might work on your device but it doesn't work in my device Implement my previous comment and cover the JavaScript then it will work in every devices
6th Dec 2020, 3:57 AM
Krish
Krish - avatar
+ 2
Ariel 983 you have to cover your JavaScript in window.onload = () => { // your code goes here // remember not to add any functions here (I am saying this with experience) then it will give you an error as here the function will be wrapped inside another function i.e. window.onload function. } then only it will work as your JavaScript gets executed before your html loads and every html selected items i.e by id, by class, etc... returns null.
7th Dec 2020, 2:40 AM
Krish
Krish - avatar
+ 1
I don’t understand, I’m just trying to get the html source code from the url.
4th Dec 2020, 3:32 AM
Jeremy Cruz
Jeremy Cruz - avatar
+ 1
I’ll then use regex to get the direct link to the individual files in the folder.
4th Dec 2020, 3:32 AM
Jeremy Cruz
Jeremy Cruz - avatar