Why am I not getting the html output in console?[Solved with axios] | SoloLearn: Learn to code for FREE!

+5

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

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

12/4/2020 3:18:45 AM

Jeremy Cruz

37 Answers

New Answer

0

Just add cors https://cors-anywhere.herokuapp.com/

+8

Just change the link https://dl.dropbox.com/sh/4vrw238llz4kbz/AADuOnH34ZIYUKU1MJtEGua

+8

OK make it. It's easy

+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 πŸ‘

+6

https://code.sololearn.com/WV44N4KOu5Yu/?ref=app check out

+5

What do you want? 🀨

+4

In sololearn there's some limits

+3

https://code.sololearn.com/WmH2a3K6U1kf/?ref=app Check out example

+2

Then use source code viewer app

+2

+2

what do you want to make

+2

AAriel 983 addEventListener works in SL JavaScript tab

+2

Jeremy Cruz just cover your JavaScript with ``` window.onload = () => { // Your code goes here } ```

+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

+2

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.

+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.

+2

Krish Oks, thank u very much. I'll try it so.

+1

I don’t understand, I’m just trying to get the html source code from the url.

+1

I’ll then use regex to get the direct link to the individual files in the folder.

+1

to get the html code from https://www.dropbox.com/sh/4vrw23c8llz4kbz/AADuOnOaH34ZIYUKU1MJtEGua?dl=0