Hello,
  The problem is a result of using a form in one frame and not using
a form in the other.

Each form maintains its own variables.  Your
form which is submitted in frame 1 knows nothing about the checkboxes
in frame 2.


The solution is to use javascript to retrieve
the values in the form which you use to submit to the servlet.
If I had to use the frames,
1) use a form name to attach the checkboxes to in Frame 2
2) declare <input type=hidden> tags in frame 1 to contain the data
   from the checkboxes in frame 2.
3) call a javascript function to retrieve the values of the checkboxes
   on Submit() of the form.
   If I recall something like
     document.frame1.form[formname].hiddenrecord2 =
     document.frame2.form[formname].record2

Hope this helps,
Stan Riley


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of bin
cai
Sent: Wednesday, December 19, 2001 3:40 PM
To: [EMAIL PROTECTED]
Subject:


Hello, listers,
I got one problem using
request.getParameter("checkboxname");
I create two frames in one window, Frame1 and frame2.
Frame 1 has the menu like add, modify and delete whcih
are put in a form.
<form name= frame 1 action="ShowStudentModule1"
method=Get Target=_parent>
<table align=center >
<tr><td>
<select name="action">
<option value="Add">Add
<option value="Modify">Modify
<option value="Delete">Delete
<option value="Upload">Upload File
</select>
</td>
<td>
<input type="submit" value="Go" >
</td>
</tr>
</table>
</form>
</body>
</html>

another frame is to show the records of student
this is html output about this page

<tr>
<td><input type="checkbox" name="record1"
value="360234" ></td>
<td>360234</td><td>Bin Tao</td></tr>

<tr>
<td><input type="checkbox" name="record2"
value="456785" ></td>
<td>456789</td><td>Tom LIu</td>
</tr>


when i check several checkbox (with differnt names)

and submit the form. I hope in the called servlet
program, the request.getParameter(checkboxname) can
get the values and then put into array for future use
e  like delete the students, for example.

but what i got is null.

could you please tell me how to get around this
problem. your help will be appreciated

bin



______________________________________________________
Send your holiday cheer with http://greetings.yahoo.ca

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to