jsp - Struts2 Bootstrap Image Selection -


i looking image selection shown here:

https://rvera.github.io/image-picker/

but not work struts2 , bootstrap, because images not displayed.

what did:

  • included .js , .css git
  • imported .js , .css jsp this

    <link href="style/image-picker/image-picker.css" rel="stylesheet"> <script src="style/image-picker/image-picker.js"></script>

  • copied example jsp

    <select class="image-picker show-html"> <option data-img-src="images/process/xxx.jpg" value="xxx.jpg"> xxx </option> <option data-img-src="images/process/yyy.jpg" value="yyy.jpg"> yyy </option> <option data-img-src="images/process/800_300.png" value="800_300.png"> default </option> <option data-img-src='http://www.example.com/image.jpg' value='42'> </select>

do have better solution image selection or idea how image picker worked ?

i know old question, did fix it?

you should call constructor of imagepicker , use on select.

$('.image-picker').imagepicker(); 

Comments