Saturday 16 March 2013

Alert Using JavaScript in OAF


    if(pageContext.getParameter("SubmitButton")!=null)
    {
      StringBuffer l_buffer = new StringBuffer();
      l_buffer.append("javascript:alert('hello')");
      pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    }


Here SubmitButton is the id name of submitbutton

l_buffer is the variable name of StringBuffer

No comments:

Post a Comment