Solved

jsp page with 2 frames (and 'submit' button in both frames)

Posted on 2003-11-04
5
1,197 Views
Last Modified: 2007-12-19
Hello,

New to jsp, so please bear with me. I have a .jsp which shows 100 rows of text. Each row of text has a checkbox (for the user to select) on the left. After the user has selected a particular row, he/she has to scroll all the way to the bottom (after the 100th row) to hit the 'Submit' button. I would like to encapsulate the 'submit' button inside a top frame (as well as having the Submit button at the bottom of the page), so no matter which row the user has selected, the submit button is always there at the top. Any ideas how the jsp page & it's frame should be constructed?

Many thanks
-A
0
Comment
Question by:alefebvre
5 Comments
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 43 total points
ID: 9683871
In your top frame, let say your, you can try this:

<input type="button" name="Button" value="Button" onclick="javascript:parent.mainFrame.form1.submit();">

where your frames structure will be like:

<frameset rows="169,*" frameborder="NO" border="2" framespacing="2" cols="*">
  <frame name="topFrame" scrolling="NO" noresize src="top.jsp" >
  <frame name="mainFrame" src="down.jsp" frameborder="NO">
</frameset>

Hope this helps
0
 
LVL 3

Assisted Solution

by:applekanna
applekanna earned 41 total points
ID: 9683930
if you are prepard to have a button for each row then you can write a small script to submit the form, this allows the user to make sure he has selected the right row to submit.


<form name = someform method = post action = ../servlet/go>
<input type = hidden name = "thValue" value = "">
</form>

<table>
<tr>
<td> <input type  = checkbox  name = "somename"  value = "100"> 100th row </td>
</td> <input type = button onclick:javascript:submitValue(100)> </td> </tr>
<tr>
<td> <input type  = checkbox  name = "somename"  value = "101"> 101th row </td>
</td> <input type = button onclick:javascript:submitValue(101)> </td> </tr>
</table>

<script>
function submitValue(value)
{
document.someform.thValue = value;
document.form.submit;
}
</script>

0
 
LVL 6

Assisted Solution

by:jarasa
jarasa earned 41 total points
ID: 9777624
Hi alefebvre.

I believe both of the above answer are perfect, but I will make you consider that you use a <DIV> with scrollbars wich will prevent the page being too large and the you can place your submit button rigt below the </DIV> so it will be alway visible and ready to be pushed, is just a matter of style.

If you need help with it just ask.

Have Fun
Javier
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A procedure for exporting installed hotfix details of remote computers using powershell
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now