it will, of course, print "null" in both
situations
since you put all the code u mentioned in
one jsp file.
(ie. u are doing request and response on the
same object in the same JSP
page,)
if you put the following into a separate jsp
file such as "Craig1.jsp" (or other jsp files):
<%
out.println(request.getParameter("button1"));
%>
out.println(request.getParameter("button1"));
%>
then, both situations will output the correct
result.
--Louie
----- Original Message -----
From: "Siegel, Craig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 31, 2000 2:26 PM
Subject: JSP:BUTTON vs INPUT
> button1:
>
> <form id=form1 action="Craig1.jsp" method=post>
> <button type=submit id=button1 name=button1 value=MyValue>OK</button>
> </form>
>
> <%
> out.println(request.getParameter("button1"));
> %>
>
> But this does work:
> <form id=form1 action="Craig1.jsp" method=post>
> <input type=submit id=button1 name=button1 value=OK>
> </form>
>
> <%
> out.println(request.getParameter("button1"));
> %>
>
>
> -craig
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
>
