0

two boxes while the code says it is only one

This is what I write:

<select onchange="location = this.value;">
<option>Test</option>   </select>

And the image is what I get. Why it duplicates itself? How can I solve it? I use bootstrap and here is the complete code of the page: This problem is the appearance of another select box which shoudn't happen. The code is composed of a single select box as you can see. But we see two select boxes. This is what the problem is.

https://pastebin.com/uTeVGvKP

  • Possible duplicate of [bootstrap 4 styled select](https://stackoverflow.com/questions/41573624/bootstrap-4-styled-select) – connexo Jul 25 '18 at 17:30
  • Can you at least create a working demo with minimum code that can reproduce the problem? Putting all your code here isn't helpful. – David Liang Jul 25 '18 at 17:59
  • Allright, here is a link: https://www.animantoloji.com/beta/oku/one-punch-m/25/17 @DavidLiang But first please click this link so that you can access the beta section which is also the link (this will grand you the permission of viewing the beta website): https://animantoloji.com/beta/betalog.php?sifre=animantobetalog – Ahmet Emin Koçal Jul 26 '18 at 10:54
  • How did you generate those dropdown options (i.e., Sayfa 1, Sayfa 2, etc)? On server side with php or via ajax? – David Liang Jul 26 '18 at 18:03
  • @AhmetEminKoçal: Are you trying to transform the native dropdown to some fancy looking mock dropdown using any jQuery plugin? – David Liang Jul 26 '18 at 18:53
  • @DavidLiang its server side, from its database. Its php by the way. And you can use this link now: https://www.animantoloji.com/oku/one-punch-m/25/12 – Ahmet Emin Koçal Jul 26 '18 at 19:00
  • @DavidLiang Actually I do not do anything, just that code and it happens. It is probably related with the html theme I use – Ahmet Emin Koçal Jul 26 '18 at 19:01
  • @AhmetEminKoçal: Idk. It's hard for me to figure it out. It seems to me that you might be using some jQuery plugin to transform a regular dropdown to fancier dropdown, and for some reason its style might be missing. That's why you're seeing 2 dropdowns. – David Liang Jul 26 '18 at 21:16
  • @DavidLiang Idk too, It seems it will continue like that for some time more... – Ahmet Emin Koçal Jul 26 '18 at 21:21
  • @DavidLiang I've found the solution. It was a css file. – Ahmet Emin Koçal Jul 28 '18 at 11:23

1 Answers1

0

The problem was a forgotten css file. I should have included bootstrap-select css file. And then add the select this class="form-control show-tick" and preferably take it into a div to limit its size.