Invoking a java function from JSP Script tag -


i have jsp file below

<script> function validateevent(){  // want call java function myprofile() here  }  </script>   <html:select property="event" styleclass="input"   onchange="validateevent();">   </html:select> 

all want is, call java function myprofile() validateevent() function, gets triggered on change of value in event dropdown. in regard appreciated.

you can't use <script> tag execute java method server-side client. tags corresponds javascript, executed on client side, , therefore doesn't have access what's going on on server directly.

if need retrieve information server, have @ called ajax.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -