Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JSP output to a different frame/form

Status
Not open for further replies.

Jay1Roy

Programmer
Jul 10, 2001
95
IE
Hi,

I need to call a JSP from one frame/form and get its output to a different frame/form. How do I do this? Please help.

Thanks,

Jayanta.
user.gif
 
it's a HTML question !!!!!
to send it from form.php to output.php simply do :
<form ...... action=&quot;output.php&quot;>
now say you want output.php in a frame named &quot;two&quot;, simply do :
<form ...... action=&quot;output.php&quot; target=&quot;two&quot;>
 
Hi Iza,

Thanks for the reply. It worked the first step. I want it to actually append to the existing matter in the frame... how do I do that?

Thanks

Jayanta.
user.gif
 
When you are dealing with Web Technologies there is really no way to &quot;append&quot; information on to pages. You can reload the page but you can't just say &quot;add this to the page&quot;. Actually, you could but that would require a bunch of javascript and a ton of testing to get it right and make it look good. This is usually an indication that there is a better way to do something.

What problem are you trying to solve? Wushutwist
 
Wushutwist is right - you CAN append but it requires to re-build dynamically the page. It's better for instance to write in a div or something like that. Let us know.
 
I have the data from the JSP in a particular frame but I actually want it within a particular ROW of a TABLE in that frame... I am not sure, how to grow this table dynamically... is it possible to have a dynamic table with its row being fed by a JSP?? Please help.

Thanks,

Jayanta.
user.gif
 
Sure. A quick and easy example:
Code:
<table>
  <tr>
    <td>Column 1</td>
    <td>Column 2</td>
  </tr>
  <tr>
    <td><%= request.getParameter(&quot;column1&quot;) %></td>
    <td><%= request.getParameter(&quot;column2&quot;) %></td>
  </tr>
</table>
Assuming that &quot;column1&quot; and &quot;column2&quot; are parameters that have been passed into the JSP. Is this what you were talking about? If not then explain your question in more detail and I (or someone else) will take another shot at it. Wushutwist
 
The Scenario:
-------------------------
| |
| Frame A |
| |
-------------------------
| Frame B |
-------------------------

There are TWO frames (Frame A and B). Frame B has a string which it needs to update in the database and at the same time show it in Frame A. Frame A is like a Result Sheet that keeps updating and lists all the strings sent from Frame B in different rows. The number of rows that might be there is unknown and needs to be dynamic. Thus your suggestion cant be used. Please try imagining this scenario and help.

Thanks,

Jayanta.
user.gif
 
Sure it could. You could reload Frame A everytime a row is updated and retrieve all updated rows. You don't NEED to append. Secondly, you could always restort to an Applet which doesn't have the stateless restraint of normal Web Development.

On another note, usually these types of problems cry out for a Design change. Sure you could rig this up to work but it is better to go back and look at what you are doing to find a better solution to the problem. What, exactly, is the business problem you are trying to solve? Wushutwist
 
This is actually a small project which needs to be very light weight as just single lines of news will be updated for view. This updation will be done from differnt locations and will reflect on this page. All users will have a list to view and the reporters will update single line, short news flashes. This is it.

Jayanta.
user.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top