• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSPs, Servlets and iFrames

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK this is a bit hard to explain without getting completely lost, but here goes...

1. I have a JSP with an iFrame in it. The JSP (search.jsp) is used to create search criteria, which are posted to a Servlet which is 'target' to the iFrame which loads a new JSP (results.jsp). So you end up with one page (search.jsp) with the search criteria and below an iFrame with the results in it.

2. If you click on one of the results it takes you OUT of the iFrame to another JSP (details.jsp) which as the name suggests has details on that result.

3. Now... I need to be able to click on a [return to results] link which takes me back the to search.jsp with the results.jsp within the iFrame (still with me).

I can't use the easy javascript:history.go(-1); option so I need to execute the Servlet which does the initial search again.

I have all this working, but..... When I click on the [return to results] button, I can't get the results to return within the iFrame, they appear in a full JSP (missing the search.jsp top).

How do I get the Servlet to know it needs to load search.jsp with results.jsp within the iFrame?

See told you it was impossible to explain, wothout getting completely lost! :-)
[ August 30, 2006: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
None of this can be handled on the server side. You need to make sure that you target the request to the desired window using the appropriate HTML markup or Javascript.
[ August 30, 2006: Message edited by: Bear Bibeault ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic