You are here: Hidden field not passed to next page. « HTML « IT news, forums, messages
Hidden field not passed to next page.

Posted by Scott on 01/02/32 11:32

I am trying to pass value by Hidden field to the next page. However,
only the NO Hidden fields are successfully passed. All hidden fields
failed to be passed and are null in the next page. Following is the
JSP code

<%@ page language = "java" %>
<%@ page import = "java.text.*, java.util.*" %>

<jsp:useBean id="Emp" class="com.abc.EmployeeAdmin" scope="page" />

<%
String loginID = request.getParameter("loginID");
....
%>
....
<FORM name="FormUpdEmp" method="POST" action="action_upd.jsp">
<inpup type="hidden" name="userID" value="test">
<inpup type="hidden" name="userName" value="Bush">

<table border=0 cols=2 width=100%>
....
</table>
....

I tried to change POST to GET, the results of the next page are exactly
same.

I tried JavaScript to set the hidden fields before submit, but failed
also:

....
<SCRIPT Language="JavaScript">

function Validate(id) {

alert("enter Validate: id = " + id);
document.FormUpdEmp.userID = id;
alert("userID = " + document.FormUpdEmp.userID);

document.FormUpdEmp.submit();
}

</SCRIPT>
</HEAD>
.....

In the above JavaScript, it is strange that I cannot use statement
document.FormUpdEmpl.userID.value = id;
or
alert("userID = " + document.FormUpdEmp.userID.value);
only the statement without .value can be successfully submitted and get
next page opened.

I cannot figure out what exactly caused the problem. The web server is
Tomcat 5.5.12 on Unix and the IE is version 6.0.2900.2180

Thanks so much.

Scott

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация