0

I'm stuck. Background image doesn't load, JS function doesn't work.

Hi! I have a code here in which background image cannot be loaded (that's my fault anyway!). I'm a beginner, so I don't know where I went wrong. However, it worked just fine when I downloaded the image on my pc and run the code there (not on a webpage) with the relative path. Another thing is, the JS function there isn't working too. What's the problem there? Thanks for checking btw! https://code.sololearn.com/W1a10a0A16A8/?ref=app

10th May 2021, 6:12 AM
Md Shahriar Rahman
Md Shahriar Rahman - avatar
8 Answers
+ 1
[JS] 🅰🅹 🅐🅝🅐🅝🅣 oh I see! My bad! Thanks!
10th May 2021, 6:24 AM
Md Shahriar Rahman
Md Shahriar Rahman - avatar
+ 1
Images https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Images_in_HTML How To Upload your phone images on SoloLearn using phone https://code.sololearn.com/WT3661NHpV3B/?ref=app Upload content with Dropbox [Tutorial] https://code.sololearn.com/WW6t4B73kJVz/?ref=app How to host/upload an image (IMGBB way) /by Farhanaz/ https://code.sololearn.com/Wy3lrXNwGsgJ/?ref=app Upload content with Google drive https://code.sololearn.com/Wa25A17a19a1/?ref=app
10th May 2021, 7:25 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
10th May 2021, 7:57 AM
Md Shahriar Rahman
Md Shahriar Rahman - avatar
0
Md Shahriar Rahman Your image file exists locally means in your device. You cannot access it anywhere on Live application or website. So you have to upload it first somewhere like on Dropbox and get link from there and put in your code. https://code.sololearn.com/WW6t4B73kJVz/?ref=app
10th May 2021, 6:17 AM
A͢J
A͢J - avatar
0
🅰🅹 🅐🅝🅐🅝🅣 can I get the link directly from where I got the image on web?
10th May 2021, 6:18 AM
Md Shahriar Rahman
Md Shahriar Rahman - avatar
0
Md Shahriar Rahman JS is not working because you passed id wrongly. There should be single quotes: "show('pwd')"
10th May 2021, 6:20 AM
A͢J
A͢J - avatar
0
[Background image] 🅰🅹 🅐🅝🅐🅝🅣 , I just changed the url. But nothing changed. Why?😅
10th May 2021, 6:28 AM
Md Shahriar Rahman
Md Shahriar Rahman - avatar
- 1
Md Shahriar Rahman Yes you can get the link and use anywhere on Live application.
10th May 2021, 6:20 AM
A͢J
A͢J - avatar