<%!
      public static boolean checkemp(String emp){
            MyConnection con=new MyConnection();
            Statement stmt = null;
            ResultSet rs = null;
            try{
                  stmt = con.getCon(1);
                  rs = stmt.executeQuery("select * from hrm_employee_mas
where emp_employee_no = " + emp);
                  if (rs.next()){
                        return (true);
                  }
                  else{
                        return (false);
                  }
            }
            catch(Exception e){
                  System.out.println(e);
            }
            return (true);
      }
%>
<script>
      function change(res){
            if (res==true){
                  alert("Employee allready exists");
                  document.femp.emp_no.focus();
            }
</script>

<INPUT type=text name=emp_no  value="<%=emp%>"  onblur="change(<%=checkemp
(?)%>)">

what should i write here ?
i want to pass current value of emp_no
in javascript i can write this.value
what about jsp?
any idea?
Thanks in advace

Regards
Vaishali
Reliance Ind Ltd
A'bad

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to