?
Solved

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

Posted on 2003-11-04
5
Medium Priority
?
1,204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 172 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 164 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 164 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Check out the latest tech news, community articles, and expert highlights in August's newsletter.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

743 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