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

ios - Is 'init' forbidden as *part* of a variable name? -

javascript - Why Selenium can't find an element that is graphically visible -

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -