I am new to thymeleaf.
This is my select statement in thymeleaf
<select id="provider" class="form-control" th:onchange="'javascript:showPIIDoc();'">
                                                <option th:value="0" >Select a Service Provider</option>
                                                <option th:each="provider : ${user.providers}"  name="name"  th:value="${provider.id}" th:text="${provider.name}" >[name]</option>
                                            </select>
this is my javascript
   <script>
function showPIIDoc()
{
    alert('in here');
}
</script> 
After running on server i cannot see the alert. Please help me.
 
                        
There is nothing special about your onchange attribute with the tag, that requires Thymeleaf.
Change it to