Solved

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

Posted on 2003-11-04
5
1,203 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 52

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today’s effective marketing is about coming down to the customers’ level and engaging in a whole new way. A text message is one of the most effective and influential ways that you can engage your customers. Here are eight ways that you can utilize t…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

690 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