Reading Hidden Controls : Form Hidden Field « JSP « Java






Reading Hidden Controls

<HTML>
  <HEAD>
    <TITLE>Reading Hidden Controls</TITLE>
  </HEAD>

    <BODY>
        <H1>Reading Hidden Controls</H1>
        <% 
            String text = "";
            if(request.getParameter("TEXT1") != null) {
                out.println("The hidden text is:" + request.getParameter("TEXT1")); 
                text = request.getParameter("TEXT1");
            }
        %>
        <FORM ACTION="action.jsp" METHOD="POST">
            <INPUT TYPE="TEXT" NAME="TEXT1">
            <INPUT TYPE="HIDDEN" NAME="HIDDEN" 
                VALUE="<%= text%>">
            <INPUT TYPE="SUBMIT" VALUE="Set Hidden Text">
        </FORM>
    </BODY>
</HTML>

           
       








JspFormReadingHiddenControls.zip( 89 k)

Related examples in the same category

1.Submitting Hidden Fields