Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

get parameter and text box -value not passing  RSS feed

 
marg wright
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to pass a value to 2rd page,
if I just use <%= passedCalculatedElecSerYear %>
on the 2rd page I get the value.
but when put it into a text box form, I don't get the value, just a blank box.
any ideas, thanks
-----
first page
---------
<%@ page import="java.io.*, java.util.*, java.text.*" %>
<% HashMap Info = new HashMap();
Info.put("calculatedElecSerYear","3");
%>
<html><head><title>Untitled</title></head>
<body>
Calculated Elective Service:
Year <%= Info.get("calculatedElecSerYear") %>
<form name="passTopbc" method="GET" action="pbc-in.jsp">
<input type="hidden" name="calculatedElecSerYear" value="<%=Info.get("calculatedElecSerYear")%>">
<input type="submit" name="b1" value="Go">
</form></body></html>
2rd page
-------
<%@ page import="java.io.*, java.util.*, java.text.*" %>
<% HashMap Info = new HashMap();
Info.put("calculatedElecSerYear","3");
%>
<html><head><title>Untitled</title></head>
<body>
Calculated Elective Service:
Year <%= Info.get("calculatedElecSerYear") %>
<form name="passTopbc" method="GET" action="pbc-in.jsp">
<input type="hidden" name="calculatedElecSerYear" value="<%=Info.get("calculatedElecSerYear")%>">
<input type="submit" name="b1" value="Go">
</form>
<%=Info.get("calculatedElecSerYear")%>">//get this value
</body></html>
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Previously posted in a different thread by marg wright:
<input type="text" name="calculatedElecSerYear" value=" <%= passedCalculatedElecSerYear %>">
it was missing
value="
marg:
I deleted your other post.
- satya
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!