Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

No blank screen

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Hope you can help me,
I'm using a jsp page to display a shopping list of sorts and each item has a checkbox next to it, to indicate whether or not it is selected, I want to be able to submit this page to a servlet to get the forms values, at the same time as this I want to open a new window to display another page which will need the current session as it needs to be submitted itself to another servlet and then it will be closed by the user.
I have attempted to do this by writing out javascript to the first window that is submitted, this opens the second window, but makes the first one blank which I don't want to happen as when the user shuts the second page they will have nothing to prompt them, so I tried to forward on a page to the first window in the servlet but this prevented javascript from opening the second window.
Does anyone know how to open a new window after a form has been submitted and still be able to put a new page in the original window ?
Sorry about the essay and thanks in advance,
John
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you said:
want to be able to submit this page to a servlet to get the forms values, at the same time as this I want to open a new window to display another page

I think it depends on what you mean by 'at the same time'. Is after form processing good enough?

If so, one possible way is to have the 1st page submit to your servlet. The output of the servlet (the response of submitting that form) would have some javascript for the onLoad method of the page its producing.

So when the response page appears from the form submission, your second window could pop open.

That's one option.
 
Please enjoy this holographic presentation of our apocalyptic dilemma right after this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic