+19

Why this code does not work?

Link of code: https://code.sololearn.com/WBP0xk07OJUx/?ref=app //It doesn't even work in the lesson. https://www.sololearn.com/learn/HTML/2217/?ref=app // Result: https://drive.google.com/file/d/1TDhWcCmllCnq9pAOsqxDUPFinsJSZIQB/view?usp=drivesdk

2/15/2020 12:11:43 PM

Satnam Singh

26 Answers

New Answer

+15

Mirielle👽 It does not work on some devices. This is probably a bug. Maybe it works fine in your device. 🅰🅹 - Pʀᴏᴅᴜᴄᴛ Mᴀɴᴀɢᴇʀ Yes it is working in w3schools. And also working on the sololearn website. But it's not running on the sololearn app.

+9

Mirielle👽 I don't know if this problem may be in my mobile or in the app. I have checked this code in another device. Which is not working on another device. 😬

+9

Ipang thank you!. Shubham Thakur i think it doesn't work on some devices.

+7

ⓈⒶⓉⓃⒶⓂ I think it's a problem with Sololearn. https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_datalist I have checked on w3schools it's working fine but same code from w3schools is not working here.

+6

Datalist is more of a search or query suggestions in a form, it won't appear until you focus on the input. edit: I checked your output and it shows there's so suggestion for "aud", however everything works fine for me

+6

Mirielle👽 I have bought from Nokia official Store. So please don't say like that. Btw let's send feedback to Sololearn.

+6

Bibek thanks friend. My code is working fine. But not in sololearn app.

+5

Firstly you should close the option tag and enter the value between the opening and closing tag Like this <option value>Value should be here</option>. Secondly datalist tag isn't working properly in sololearn I have also tried better move to this code <select id="cars" name="cars"> <optgroup label="Big companies"> <option selected value="Audi">Audi</option> <option value="BMW">BMW</option> <option value="Jaguar">Jaguar</option> <option value="Volvo">Volvo</option> </optgroup> </select>

+4

Mirielle👽 Means it's problem with my phone also. Btw I have Nokia 7plus android one with latest updates and the code is not working.

+3

Maybe it's a problem with your phones and not the app since it works on the web version

+3

It works for me (tested on SoloLearn app and Chrome - in a phone), the car brand list shows up, though I was expecting the list to show after I type something (like offering suggestion) rather than showing up on focus. Great code anyways ⓈⒶⓉⓃⒶⓂ 👍 (Edited)

+2

your code was fine with me . i could run the code in my device. i think error is on your sololearn app. once i too got your problem.

+2

It's working.

+2

For me personally it does work maybe your browser does not know this tag so you can try opening this link in a different browser ... Wishing you lots of success post Scriptum. You should always have software installed on your computer. You can run the code on a real project and if you install updated and original software then all tags should work smoothly

+2

Use a select with options....

+2

I think it has to deal with browser support

+1

There are alot of fake mobiles selling and to be sold, maybe y'all are a victim

+1

+1

You too😊

+1

It's should be list in input not id="that datalist"