[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2003-11-04
5
Medium Priority
?
1,205 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

What monsters are hiding in your child's room? In this article I will share with you a tech horror story that could happen to anyone, along with some tips on how you can prevent it from happening to you.
As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

649 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