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

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

java - How to compare two classes -

mysql - Gateway Timeout Error on Insert 70000 record using Hibernate in Java -