How to call a bean from Java Script code when button clicked?
Here is a piece of code on how it is the flow
<script language="Javascript">
function validatefields()
{
...Code for validating fields
!!HERE I WANT TO CALL A METHOD FROM MY BEAN!!
}
</script>
<body>
<jsp:useBean id="UpdateBean" class="com.class.web.comp.mybean" scope="session" />
<form name="myform" >
<input type="button" name="SaveProg" value=" Program " onClick="Javascript:validatefields();">
</from>
Here is a piece of code on how it is the flow
<script language="Javascript">
function validatefields()
{
...Code for validating fields
!!HERE I WANT TO CALL A METHOD FROM MY BEAN!!
}
</script>
<body>
<jsp:useBean id="UpdateBean" class="com.class.web.comp.mybean" scope="session" />
<form name="myform" >
<input type="button" name="SaveProg" value=" Program " onClick="Javascript:validatefields();">
</from>