Win a copy of Svelte and Sapper in Action this week in the JavaScript 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to close a child window through the servlet?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Does anybody have done closing a window through the servlet? I'm only using Java and servlets in manipulating a form(created separately and viewed through the browser). No javascript.

Here's the scenario: by clicking a link from the parent window, another window opens displaying a form. By clicking a button from the form, the newly opened window should be closed and the focus returns to the parent window.
Is there a way to do this?
Hoping for your inputs.
Thanks,
bitoy
 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And you don't use Javascript because...???
bear
 
jespher vhaugn
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we're not allowed to use javascript because there is already a predefined form to be manipulated...
 
Bear Bibeault
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

we're not allowed to use javascript because there is already a predefined form to be manipulated...


That makes no sense to me, but the point is, there are just some things that require Javascript to accomplish. If you won't or can't or don't use Javascript, then you just can't do those things.
Servlets and JSPs are server-side technologies. HTML and Javascript are client-side. To perform client-side operations, you need to use client-side tools.
Maybe we can discuss why you, or your boss, or your client, or whoever, thinks that you can't safely use Javascript because of some 'predefined form' issue?
hth,
bear
 
Sheriff
Posts: 9099
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about this?

servlet #1 calls servlet #2 which contains the html of the form. When you click the button (submit (with info) or cancel (with no info) the form) you are clicking a link back to the first servlet
 
jespher vhaugn
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose I can use javascript in closing the child window,
how will I do it if the command would come from the form displayed in the child window...
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic