Struts:How to set html form "target" at runtime.To display results in same window or open a new window(frameset) depending on the query result.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anu_Radha
Posted On:   Thursday, January 20, 2005 09:35 AM

Hi, We have a financial data application and are using Struts, Tiles, tomcat etc. We have a search screen which queries the database. If the query returns one result we need to show the data in a new window(frameset). If more than 1 row is retrieved we display all the rows in the same window and when the user selects a particular row, open a new window(frameset) and show the data. My question is Is it possible to set the form "target" at runtime. Before the query is run we do not know if the data has to be shown in the same window or open a new window(frameset). Any ideas on how to implement this functionality? Thanks in advance.    More>>

Hi,

We have a financial data application and are using Struts, Tiles, tomcat etc. We have a search screen which queries the database. If the query returns one result we need to show the data in a new window(frameset). If more than 1 row is retrieved we display all the rows in the same window and when the user selects a particular row, open a new window(frameset) and show the data.

My question is
Is it possible to set the form "target" at runtime. Before the query is run we do not know if the data has to be shown in the same window or open a new window(frameset).
Any ideas on how to implement this functionality?


Thanks in advance.

   <<Less

Re: Struts:How to set html form "target" at runtime.To display results in same window or open a new window(frameset) depending on the query result.

Posted By:   Malaiah_Reddy  
Posted On:   Friday, February 11, 2005 01:42 AM

You Can Achieve this using JavaScript.....

try the following Example....

Create 4 HTML files as follows , and run the Main.html




Main.html











First.html








This is a link to External Page

Change Target To Second Frame

Change Target To Third Frame







Second.html



Second Page



Third.html



Third Page




Link.html



Hello , How Are You.............
About | Sitemap | Contact