I need some help regarding js
function call from a javascript.
I have a servlet which checks whether the agreement number is null
or not.
If agreement number is not null
then it will show a message box in jsp.
Servlet code is -
String agrno = request.getParameter("agrno");
System.out.println("agrno in checkcash =" + agrno);
sql = "select agrno from ColdStorage.RecieptMaster where agrno = ?";
prest = (PreparedStatement) conn.prepareStatement(sql);
prest.setString(1, agrno);
String agrid = "";
rs = prest.executeQuery();
while(rs.next())
{
agrid = rs.getString("agrno");
System.out.println("agrid = "+agrid);
}
if(agrid != null)
{
// javascript call should be here.
}
and javascript code is:
Ext.widget('button', {
renderTo: Ext.getBody()
, text: 'Show Message'
, handler: function () {
Ext.Msg.show({
//title: '',
msg: 'Cash Receipt for specified Agreement number already exist, do you want to regenerate it? ',
buttonText: { yes: "YES", no: "NO"},
buttons: Ext.MessageBox.YESNO
});
}
});